safety for row stride calc failure
[framework/uifw/edbus.git] / src / lib / notification / notification.c
index cd75d5a..80e8844 100644 (file)
@@ -394,6 +394,8 @@ e_notification_image_init(E_Notification_Image *img, Evas_Object *obj)
    img->has_alpha = !!evas_object_image_alpha_get(obj);
    img->channels = img->has_alpha ? 4 : 3;
    img->rowstride = evas_object_image_stride_get(obj);
+   if (img->rowstride == 4 * img->width)
+     img->rowstride = img->channels * img->width;
    if (rgb) evas_object_image_data_set(obj, img->data);
    return EINA_TRUE;
 }