[Widget viewer evas] Fixed crash issue of homescreen; remove the default preview... 30/67230/1 accepted/tizen/common/20160426.143401 accepted/tizen/ivi/20160426.102749 accepted/tizen/mobile/20160426.102642 accepted/tizen/tv/20160426.102603 accepted/tizen/wearable/20160426.102803 submit/tizen/20160426.024716
authormoon87.park <moon87.park@samsung.com>
Tue, 26 Apr 2016 02:41:31 +0000 (11:41 +0900)
committermoon87.park <moon87.park@samsung.com>
Tue, 26 Apr 2016 02:41:31 +0000 (11:41 +0900)
Change-Id: Ie2923ea8ff6a0ed5890d09725023f1eeeeb1f1a6

widget_viewer_evas/src/widget_viewer_evas.c

index c87fe10..3813c72 100644 (file)
@@ -375,17 +375,17 @@ static void resize_cb(void *data, Evas *e, Evas_Object *layout, void *event_info
                if (!info->disable_preview) {
                        widget_service_get_size_type(w, h, &size_type);
                        preview_path = widget_service_get_preview_image_path(info->widget_id, size_type);
-                       if (!preview_path) {
-                               preview_path = WIDGET_VIEWER_EVAS_RESOURCE_DEFAULT_IMG;
-                       }
+                       if (preview_path) {
+                               preview = elm_image_add(layout);
+                               if (preview) {
+                                       elm_image_file_set(preview, preview_path, NULL);
+                                       elm_object_part_content_set(layout, "preview", preview);
+                               }
+
+                               free(preview_path);
 
-                       preview = elm_image_add(layout);
-                       if (preview) {
-                               elm_image_file_set(preview, preview_path, NULL);
-                               elm_object_part_content_set(layout, "preview", preview);
                        }
 
-                       free(preview_path);
                }
 
                if (!info->disable_loading) {