From 86806723e16f45ca68201603db5dcf0f12748063 Mon Sep 17 00:00:00 2001 From: Oleksander Kostenko Date: Wed, 7 Sep 2016 12:50:48 +0300 Subject: [PATCH] TizenRefApp-7086 Fix SVACE-issue in wallpaper-ui-service Change-Id: I80627db572dee5dff00c61456319357244c2d0df Signed-off-by: Oleksander Kostenko --- src/wallpaper-ui-service-main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wallpaper-ui-service-main.c b/src/wallpaper-ui-service-main.c index 75abcf8..db1a268 100644 --- a/src/wallpaper-ui-service-main.c +++ b/src/wallpaper-ui-service-main.c @@ -211,22 +211,22 @@ static void _service_gallery_ug_result_cb(app_control_h request, app_control_h r object_item = elm_gengrid_first_item_get(ad->gengrid); item = (Thumbnail *)elm_object_item_data_get(object_item); - item->bSelected = EINA_TRUE; - item->path = strdup(ad->saved_img_path); - item->type = WALLPAPER_TYPE_GALLERY; - ad->preview_image_type = WALLPAPER_TYPE_GALLERY; - - elm_object_item_data_set(object_item, item); - elm_gengrid_item_update(object_item); - elm_object_signal_emit(ad->preview_layout, "show_preview", "preview_image"); + if(item) + { + item->bSelected = EINA_TRUE; + item->path = strdup(ad->saved_img_path); + item->type = WALLPAPER_TYPE_GALLERY; - _wallpaper_show_focus_highlight(item->index); + elm_object_item_data_set(object_item, item); + elm_gengrid_item_update(object_item); + _wallpaper_show_focus_highlight(item->index); + } + ad->preview_image_type = WALLPAPER_TYPE_GALLERY; + elm_object_signal_emit(ad->preview_layout, "show_preview", "preview_image"); state_data.flag_image_from_gallery = EINA_TRUE; state_data.flag_changed = EINA_TRUE; - - } - + } WALLPAPERUI_TRACE_END; } -- 2.7.4