diff options
author | Hyojung Jo <hj903.jo@samsung.com> | 2015-08-03 19:05:46 +0900 |
---|---|---|
committer | Hyojung Jo <hj903.jo@samsung.com> | 2015-08-03 19:05:46 +0900 |
commit | b490e239940c2756e813f727a8d672890dc97596 (patch) | |
tree | 5cb35816b00b59ffbe9da9594e007f42eb35cca6 | |
parent | 9d9a5669ea2ba2832b739ee00e807783438e9c31 (diff) | |
download | air_favorite-b490e239940c2756e813f727a8d672890dc97596.tar.gz air_favorite-b490e239940c2756e813f727a8d672890dc97596.tar.bz2 air_favorite-b490e239940c2756e813f727a8d672890dc97596.zip |
Fixed the switch handle statements
Change-Id: If0a1247dbb03deebe87784efeac5a9777cd9b946
Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
-rw-r--r-- | src/data/media.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/data/media.c b/src/data/media.c index e6963e8..c118ea6 100644 --- a/src/data/media.c +++ b/src/data/media.c @@ -160,16 +160,19 @@ static char *_get_data(void *data, enum data_type type) return minfo->file_path; case DATA_DURATION: - if (minfo->video) - return _get_video_duration(minfo); + if (!minfo->video) + return NULL; + return _get_video_duration(minfo); case DATA_ARTIST: - if (minfo->audio) - return minfo->audio->artist; + if (!minfo->audio) + return NULL; + return minfo->audio->artist; case DATA_ALBUM_NAME: - if (minfo->audio) - return minfo->audio->album; + if (!minfo->audio) + return NULL; + return minfo->audio->album; default: _ERR("Unhandled data type."); |