LOCATIONS_NULL_ARG_CHECK(manager);
LOCATIONS_NULL_ARG_CHECK(callback);
location_manager_s *handle = (location_manager_s *) manager;
- handle->user_cb[type] = callback;
- handle->user_data[type] = user_data;
+ if (handle != NULL){
+ handle->user_cb[type] = callback;
+ handle->user_data[type] = user_data;
+ }
+ else
+ LOCATIONS_LOGE("Null Handle");
LOCATIONS_LOGD("event type : %d", type);
return LOCATIONS_ERROR_NONE;
}
{
LOCATIONS_NULL_ARG_CHECK(manager);
location_manager_s *handle = (location_manager_s *) manager;
- handle->user_cb[type] = NULL;
- handle->user_data[type] = NULL;
+ if (handle != NULL){
+ handle->user_cb[type] = NULL;
+ handle->user_data[type] = NULL;
+ }
+ else
+ LOCATIONS_LOGE("Null Handle");
LOCATIONS_LOGD("event type : %d", type);
return LOCATIONS_ERROR_NONE;
}