Fix the svace 2.2 issue 32/102632/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:24:50 +0000 (17:24 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:24:50 +0000 (17:24 +0900)
Change-Id: Iaea0183423fe391e000bd6ef3ccb05c81ad474b1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
ag-agent/bluetooth-ag-manager.c

index b5fbd28..4e322cf 100755 (executable)
@@ -528,6 +528,11 @@ static void __bt_hfp_handle_call_conference(void)
 
                struct telephony_call *t_call = t_call_list->data;
 
+               if (t_call == NULL) {
+                       ERR("t_call is NULL");
+                       break;
+               }
+
                if (t_call->call_status == HFP_CALL_STATUS_ACTIVE) {
                        if (t_active_call == NULL)
                                t_active_call = t_call;
@@ -554,10 +559,10 @@ static void __bt_hfp_handle_call_conference(void)
                }
        }
 
-       if (t_held_call_count == 1)
+       if (t_held_call != NULL && t_held_call_count == 1)
                t_held_call->call_conference = FALSE;
 
-       if (t_active_call_count == 1)
+       if (t_active_call != NULL && t_active_call_count == 1)
                t_active_call->call_conference = FALSE;
 }