summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyerim Kim <rimi.kim@samsung.com>2016-09-09 17:10:58 +0900
committerHyerim Kim <rimi.kim@samsung.com>2016-09-09 17:10:58 +0900
commit4b7548cb3a064e4274cd70edfc5a1e25b08a1b8e (patch)
tree9422b4e17b74ff80ce6dcf46ee2175de55683321
parent131351c565c1bbfe4120b33dfa54c7f732798e04 (diff)
downloadair_mediahub-4b7548cb3a064e4274cd70edfc5a1e25b08a1b8e.tar.gz
air_mediahub-4b7548cb3a064e4274cd70edfc5a1e25b08a1b8e.tar.bz2
air_mediahub-4b7548cb3a064e4274cd70edfc5a1e25b08a1b8e.zip
- WGID : 30802, 141837, 141838, 141848, 141854 Signed-off-by: Hyerim Kim <rimi.kim@samsung.com> Change-Id: Iba08c6da24e57a0fa355893bc3fbbc9899ff9db9
-rw-r--r--src/layout/music.c6
-rw-r--r--src/view/detail.c9
-rw-r--r--src/view/mplayer.c5
-rw-r--r--src/view/viewer.c6
4 files changed, 21 insertions, 5 deletions
diff --git a/src/layout/music.c b/src/layout/music.c
index 20b5c7a..a7ab1a0 100644
--- a/src/layout/music.c
+++ b/src/layout/music.c
@@ -622,7 +622,11 @@ static void _update(void *layout_data, int update_type, void *data)
if (priv->playing_info) {
mi = app_media_get_info(priv->playing_info);
- _update_playing_item(priv, mi->media_id);
+
+ if (mi)
+ _update_playing_item(priv, mi->media_id);
+ else
+ _update_playing_item(priv, NULL);
}
break;
case UPDATE_PLAY_INFO:
diff --git a/src/view/detail.c b/src/view/detail.c
index 41aec30..e490e45 100644
--- a/src/view/detail.c
+++ b/src/view/detail.c
@@ -189,7 +189,8 @@ static void _pop_view(struct _priv *priv)
if (view_info[priv->view_type].app_contents_type != CONTENTS_GALLERY) {
if (priv->play_info) {
mi = app_media_get_info(priv->play_info);
- vdata.id = mi->media_id;
+ if (mi)
+ vdata.id = mi->media_id;
}
}
@@ -1142,7 +1143,11 @@ static void _update(void *view_data, int update_type, void *data)
if (priv->play_info) {
mi = app_media_get_info(priv->play_info);
- _update_play_info(priv, mi->media_id);
+
+ if (mi)
+ _update_play_info(priv, mi->media_id);
+ else
+ _update_play_info(priv, NULL);
} else
_update_play_info(priv, NULL);
break;
diff --git a/src/view/mplayer.c b/src/view/mplayer.c
index e085b72..d17a415 100644
--- a/src/view/mplayer.c
+++ b/src/view/mplayer.c
@@ -1131,7 +1131,7 @@ static void _hide(void *view_data)
static void _update(void *view_data, int update_type, void *data)
{
struct _priv *priv;
- struct view_update_data *vdata;
+ struct view_update_data *vdata = NULL;
struct view_update_data temp_update_data;
if (!view_data || !data) {
@@ -1140,6 +1140,9 @@ static void _update(void *view_data, int update_type, void *data)
}
priv = view_data;
+ temp_update_data.list = NULL;
+ temp_update_data.index = 0;
+ temp_update_data.id = NULL;
if (update_type == UPDATE_CONTENT_WITH_MEDIA_ID) {
app_media *am = NULL;
diff --git a/src/view/viewer.c b/src/view/viewer.c
index c31e913..dd7ceed 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -1462,7 +1462,7 @@ static void _hide(void *view_data)
static void _update(void *view_data, int update_type, void *data)
{
struct _priv *priv;
- struct view_update_data *vdata;
+ struct view_update_data *vdata = NULL;
struct view_update_data temp_update_data;
if (!view_data) {
@@ -1472,6 +1472,10 @@ static void _update(void *view_data, int update_type, void *data)
priv = view_data;
+ temp_update_data.list = NULL;
+ temp_update_data.index = 0;
+ temp_update_data.id = NULL;
+
if (update_type == UPDATE_CONTENT_WITH_MEDIA_ID) {
app_media *am = NULL;
am = mediadata_get_app_media_by_file_path(data);