Fix Crash during Call End 52/172152/1
authorVikas Kumar Agrawal <vikas.ag@samsung.com>
Sun, 11 Mar 2018 09:22:42 +0000 (14:52 +0530)
committerVikas Kumar Agrawal <vikas.ag@samsung.com>
Mon, 12 Mar 2018 08:11:36 +0000 (13:41 +0530)
Change-Id: I7b543b2b7fed2d6b1bcf1affb77cb1300a811f92

playview/src/common/vp-play-config.c

index 2d4377b..71d253e 100644 (file)
@@ -286,7 +286,7 @@ static void _call_async_event_callback(telephony_h handle,
        PlayView *pPlayView = (PlayView *) user_data;
        int ret = TELEPHONY_ERROR_NONE;
        telephony_call_h *call_list_sim;
-       telephony_call_status_e status;
+       telephony_call_status_e status = TELEPHONY_CALL_STATUS_IDLE;
        telephony_error_e ret_sim;
        unsigned int count_sim = 0;
 
@@ -300,10 +300,12 @@ static void _call_async_event_callback(telephony_h handle,
                return;
        }
 
-       ret = telephony_call_get_status(*call_list_sim, &status);
-       if (ret != TELEPHONY_ERROR_NONE) {
-               VideoLogError("getting call status failed");
-               return;
+       if (call_list_sim) {
+               ret = telephony_call_get_status(*call_list_sim, &status);
+               if (ret != TELEPHONY_ERROR_NONE) {
+                       VideoLogError("getting call status failed");
+                       return;
+               }
        }
        VideoLogDebug("call status = %d", status);