summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/layout/movie.c15
-rw-r--r--src/layout/music.c15
2 files changed, 12 insertions, 18 deletions
diff --git a/src/layout/movie.c b/src/layout/movie.c
index d5fb864..a70376c 100644
--- a/src/layout/movie.c
+++ b/src/layout/movie.c
@@ -457,6 +457,8 @@ static void _update_recent_item(struct _priv *priv, const char *id)
if (!dmgr)
return;
+ info = NULL;
+
list = dmgr->ops->get_list(dmgr->handle, E_LIST_MEDIA, NULL);
if (id)
@@ -464,15 +466,10 @@ static void _update_recent_item(struct _priv *priv, const char *id)
else
am = _get_recent_item(list);
- if (!am) {
- _ERR("failed to get app media");
- return;
- }
-
- info = app_media_get_info(am);
- if (!info) {
- _ERR("failed to get app media info");
- return;
+ if (am) {
+ info = app_media_get_info(am);
+ if (!info)
+ _ERR("failed to get app media info");
}
priv->recent_info = am;
diff --git a/src/layout/music.c b/src/layout/music.c
index d62c05b..a11324a 100644
--- a/src/layout/music.c
+++ b/src/layout/music.c
@@ -404,6 +404,8 @@ static void _update_playing_item(struct _priv *priv, const char *id)
if (!dmgr)
return;
+ info = NULL;
+
list = dmgr->ops->get_list(dmgr->handle, E_LIST_MEDIA, NULL);
if (id)
@@ -411,15 +413,10 @@ static void _update_playing_item(struct _priv *priv, const char *id)
else
am = _get_playing_item(list);
- if (!am) {
- _ERR("failed to get app media");
- return;
- }
-
- info = app_media_get_info(am);
- if (!info) {
- _ERR("failed to get app media info");
- return;
+ if (am) {
+ info = app_media_get_info(am);
+ if (!info)
+ _ERR("failed to get app media info");
}
priv->playing_info = am;