[0.3.53] fix svace issue 43/121843/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Tue, 21 Mar 2017 03:26:58 +0000 (12:26 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Wed, 29 Mar 2017 07:25:14 +0000 (16:25 +0900)
Change-Id: I61b3b398f9238092b490dc770f5202d5d3932285

src/player.c

index 4bf7a4a..2f3cc78 100644 (file)
@@ -468,7 +468,14 @@ static void set_null_user_cb(callback_cb_info_s * cb_info, muse_player_event_e e
  */
 static void set_null_user_cb_lock(callback_cb_info_s * cb_info, muse_player_event_e event)
 {
-       bool lock = g_thread_self() != cb_info->event_queue.thread;
+       bool lock = false;
+
+       if (!cb_info) {
+               LOGE("cb_info is NULL, event: %d", event);
+               return;
+       }
+
+       lock = (g_thread_self() != cb_info->event_queue.thread);
 
        if (lock)
                g_mutex_lock(&cb_info->event_queue.mutex);