Fix NULL handle issue for each module 85/66685/2 accepted/tizen/common/20160420.142109 accepted/tizen/ivi/20160421.011317 accepted/tizen/mobile/20160421.011451 accepted/tizen/tv/20160421.011338 accepted/tizen/wearable/20160421.011355 submit/tizen/20160420.102547
authorWootak Jung <wootak.jung@samsung.com>
Wed, 20 Apr 2016 09:20:03 +0000 (18:20 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 20 Apr 2016 09:49:00 +0000 (18:49 +0900)
- TSAM-2324

Change-Id: I1153ae438c828b8e70c8de7d405350c7ca161e41

module/src/callmgr-sensor.c
packaging/call-manager.spec
service/src/callmgr-core.c

index e187cd8..2b3cdc4 100755 (executable)
@@ -85,6 +85,7 @@ static void __callmgr_sensor_face_down_cb(gesture_type_e gesture, const gesture_
 int _callmgr_sensor_face_down_start(callmgr_sensor_handle_h sensor_handle)
 {
        dbg(">>");
+       CM_RETURN_VAL_IF_FAIL(sensor_handle, -1);
 
        int ret = -1;
        bool is_supported = true;
@@ -145,6 +146,7 @@ int _callmgr_sensor_face_down_start(callmgr_sensor_handle_h sensor_handle)
 int _callmgr_sensor_face_down_stop(callmgr_sensor_handle_h sensor_handle)
 {
        dbg(">>");
+       CM_RETURN_VAL_IF_FAIL(sensor_handle, -1);
 
        if (sensor_handle->gesture_handle == NULL) {
                warn("No handle");
index 3ae909e..8b8db70 100755 (executable)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 58
+%define patchlevel 59
 %define ext_feature 0
 
 Name:           call-manager
index 064ad1a..9b20c68 100644 (file)
@@ -2077,13 +2077,16 @@ int _callmgr_core_init(callmgr_core_data_t **o_core_data)
        CM_RETURN_VAL_IF_FAIL(core_data->ringer_handle, -1);
 
        _callmgr_bt_init(&core_data->bt_handle, __callmgr_core_process_bt_events, core_data);
-       CM_RETURN_VAL_IF_FAIL(core_data->bt_handle, -1);
+       if (!core_data->bt_handle)
+               err("core_data->bt_handle is NULL");
 
        _callmgr_sensor_init(&core_data->sensor_handle, __callmgr_core_process_sensor_events, core_data);
-       CM_RETURN_VAL_IF_FAIL(core_data->sensor_handle, -1);
+       if (!core_data->sensor_handle)
+               err("core_data->sensor_handle is NULL");
 
        _callmgr_vr_init(&core_data->vr_handle, __callmgr_core_process_vr_events, core_data);
-       CM_RETURN_VAL_IF_FAIL(core_data->vr_handle, -1);
+       if (!core_data->vr_handle)
+               err("core_data->vr_handle is NULL");
 
        *o_core_data = core_data;