evas: do not unref if there is no clipper 59/76859/1 accepted/tizen/common/20160629.222330 accepted/tizen/ivi/20160628.100956 accepted/tizen/mobile/20160628.100909 accepted/tizen/tv/20160628.100924 accepted/tizen/wearable/20160628.100939 submit/tizen/20160627.124437
authorHosang Kim <hosang12.kim@samsung.com>
Mon, 27 Jun 2016 12:28:42 +0000 (21:28 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Mon, 27 Jun 2016 12:30:26 +0000 (21:30 +0900)
check if there is a clipper set before accessing it. This fixes crashes
of the drm engine.

Author:     Marcel Hollerbach <marcel-hollerbach@t-online.de>
Change-Id: I0dd09b8b42975ebc0bf69f2656f341babbe35de8

src/lib/evas/canvas/evas_object_smart.c

index 16a2e79..cb1a6cb 100644 (file)
@@ -1022,9 +1022,10 @@ evas_object_smart_changed_get(Evas_Object *eo_obj)
      return EINA_FALSE;
 
    //b. Object clipper visibility
-   if (!(obj->prev->clipper->cur->visible && obj->cur->clipper->cur->visible) ||
+   if ((obj->prev->clipper && obj->cur->clipper) &&
+       (!(obj->prev->clipper->cur->visible && obj->cur->clipper->cur->visible) ||
        ((obj->prev->clipper->cur->color.a == 0) &&
-        (obj->prev->clipper->prev->color.a == 0)))
+        (obj->prev->clipper->prev->color.a == 0))))
      return EINA_FALSE;
 
    if (!obj->clip.clipees)