Evas.Image: Add NULL check before calling engine function
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Mar 2016 06:07:20 +0000 (15:07 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Mar 2016 06:19:54 +0000 (15:19 +0900)
src/lib/evas/canvas/efl_canvas_image.c

index 66d7b8c..d6fb366 100644 (file)
@@ -589,10 +589,13 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
 
    // FIXME: buffer border support is not implemented
 
-   if (ENFN->image_data_maps_get(ENDT, o->engine_data, NULL, NULL) > 0)
+   if (ENFN->image_data_maps_get)
      {
-        ERR("can not set pixels when there are open memory maps");
-        return EINA_FALSE;
+        if (ENFN->image_data_maps_get(ENDT, o->engine_data, NULL, NULL) > 0)
+          {
+             ERR("can not set pixels when there are open memory maps");
+             return EINA_FALSE;
+          }
      }
 
    if (o->pixels_checked_out)