[N_SE-7985] fix null point bug (strlen)
authorByeongin Oh <quddls.oh@samsung.com>
Tue, 28 Aug 2012 10:16:05 +0000 (19:16 +0900)
committerByeongin Oh <quddls.oh@samsung.com>
Tue, 28 Aug 2012 10:16:05 +0000 (19:16 +0900)
Change-Id: I71ea067a75ec2ec5c3c8f26ebb5486bc902bb424

src/core/mp-play-list.c

index 6969603..e5cfebc 100755 (executable)
@@ -369,7 +369,11 @@ _mp_play_list_set_playing_item(void *data, mp_play_list * play_list, char *fid)
                MP_CHECK_EXCEP(item);
                if (!g_strcmp0(item->fid, fid))
                {
-                       if (!strlen(item->fid))
+                       int len = 0;
+                       if (item->fid)
+                               len = strlen(item->fid);
+
+                       if (!item->fid || len <= 0)
                        {
                                char *path = NULL;