Fix crash issue 01/151501/2
authorRavi Kiran K N <ravi.kiran@samsung.com>
Thu, 21 Sep 2017 06:04:19 +0000 (11:34 +0530)
committerRavi Kiran K N <ravi.kiran@samsung.com>
Thu, 21 Sep 2017 06:09:59 +0000 (11:39 +0530)
Change-Id: Ia89174a2a85a34ed9fa46630439d6fb2bf133890
Signed-off-by: Ravi Kiran K N <ravi.kiran@samsung.com>
src/common/mp-util.c

index 4c07b8c..275d361 100644 (file)
@@ -1140,11 +1140,11 @@ bool mp_util_call_off(void)
                return TRUE;
        }
 
-       for (int i=0;i<tel_list.count;i++) {
+       for (int i = 0; i < tel_list.count; i++) {
                ret =
                                telephony_call_get_call_list(tel_list.handle[i], &count_sim[i],
                                                &call_list_sim);
-               if (ret != TELEPHONY_ERROR_NONE) {
+               if (ret != TELEPHONY_ERROR_NONE || call_list_sim == NULL) {
                        VideoLogError("Cannot get call list information for the sim");
                        return TRUE;
                }