safety check in case this fails
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 6 Nov 2011 15:41:45 +0000 (15:41 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 6 Nov 2011 15:41:45 +0000 (15:41 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@64828 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/notification/notification.c

index 79d6cf7..16aa494 100644 (file)
@@ -379,11 +379,12 @@ e_notification_image_init(E_Notification_Image *img, Evas_Object *obj)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(img, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
+   img->data = evas_object_image_data_get(obj, EINA_FALSE);
+   if (!img->data) return EINA_FALSE;
    evas_object_image_load_size_get(obj, &img->width, &img->height);
    img->has_alpha = !!evas_object_image_alpha_get(obj);
    img->channels = img->has_alpha ? 4 : 3;
    img->rowstride = evas_object_image_stride_get(obj);
-   img->data = evas_object_image_data_get(obj, EINA_FALSE);
    evas_object_image_data_set(obj, img->data);
    return EINA_TRUE;
 }