summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-10-13 06:23:45 (GMT)
committerJehun Lim <jehun.lim@samsung.com>2015-10-13 08:03:51 (GMT)
commit2e74661d4a5b7508c037028670dd32c412a6f478 (patch)
tree6e9719f8a438ed21360c447f9a563bdc712cef3a
parentc8229793f6e23323fd7dba74346bd909d2e49339 (diff)
downloadair_mediahub-2e74661d4a5b7508c037028670dd32c412a6f478.zip
air_mediahub-2e74661d4a5b7508c037028670dd32c412a6f478.tar.gz
air_mediahub-2e74661d4a5b7508c037028670dd32c412a6f478.tar.bz2
base: add null check for grid data (prevent: 483459, 484089)refs/changes/35/49435/1
Change-Id: Idffc56544db3984e02b716598585cd0bf661c7cf Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r--src/layout/gallery.c5
-rw-r--r--src/layout/movie.c5
-rw-r--r--src/layout/music.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/layout/gallery.c b/src/layout/gallery.c
index 1f62e6b..288cb46 100644
--- a/src/layout/gallery.c
+++ b/src/layout/gallery.c
@@ -139,6 +139,11 @@ static void _update_content_list(struct _priv *priv)
}
priv->gdata = get_gallery_grid_data(priv->view_mode);
+ if (!priv->gdata) {
+ elm_object_part_text_set(priv->layout,
+ PART_NOCONTENT, TEXT_NOCONTENT);
+ return;
+ }
list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
if (!list) {
diff --git a/src/layout/movie.c b/src/layout/movie.c
index 4d963b5..3771060 100644
--- a/src/layout/movie.c
+++ b/src/layout/movie.c
@@ -379,6 +379,11 @@ static void _update_content_list(struct _priv *priv)
}
priv->gdata = get_movie_grid_data(priv->view_mode);
+ if (!priv->gdata) {
+ elm_object_part_text_set(priv->layout,
+ PART_NOCONTENT, TEXT_NOCONTENT);
+ return;
+ }
list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
if (!list) {
diff --git a/src/layout/music.c b/src/layout/music.c
index a42491d..30a8826 100644
--- a/src/layout/music.c
+++ b/src/layout/music.c
@@ -332,6 +332,11 @@ static void _update_content_list(struct _priv *priv)
}
priv->gdata = get_music_grid_data(priv->view_mode);
+ if (!priv->gdata) {
+ elm_object_part_text_set(priv->layout,
+ PART_NOCONTENT, TEXT_NOCONTENT);
+ return;
+ }
dmgr = _get_datamgr(priv);
if (!dmgr)