eeze/sensor: Break out from the read if the sensor object is NULL

Better handle this error case. Spotted by some unit tests updates.

SVN revision: 80671
This commit is contained in:
Stefan Schmidt 2012-12-11 16:48:43 +00:00
parent 083434f695
commit 1e8dc19715
1 changed files with 2 additions and 0 deletions

View File

@ -229,6 +229,8 @@ eeze_sensor_async_read(Eeze_Sensor_Obj *sens, void *user_data)
{
Eeze_Sensor_Module *module = NULL;
if (!sens) return EINA_FALSE;
module = _highest_priority_module_get();
if (!module) return EINA_FALSE;
if (module->async_read)