modules/notification: e_comp_object_util_zone_get Can return NULL so
authorChris Michael <cp.michael@samsung.com>
Fri, 5 Sep 2014 16:20:54 +0000 (12:20 -0400)
committerChris Michael <cp.michael@samsung.com>
Fri, 5 Sep 2014 16:20:54 +0000 (12:20 -0400)
we should check the return before trying to use it. Should fix Phab
T1618

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/notification/e_mod_popup.c

index eadb842..b0b9cbd 100644 (file)
@@ -443,9 +443,11 @@ _notification_popup_refresh(Popup_Data *popup)
    /* Compute the new size of the popup */
    edje_object_calc_force(popup->theme);
    edje_object_size_min_calc(popup->theme, &w, &h);
-   zone = e_comp_object_util_zone_get(popup->win);
-   w = MIN(w, zone->w / 2);
-   h = MIN(h, zone->h / 2);
+   if ((zone = e_comp_object_util_zone_get(popup->win)))
+     {
+        w = MIN(w, zone->w / 2);
+        h = MIN(h, zone->h / 2);
+     }
    evas_object_resize(popup->win, w, h);
 }