From: Hwankyu Jhun Date: Mon, 20 Mar 2017 08:10:57 +0000 (+0900) Subject: Add exception handlings X-Git-Tag: accepted/tizen/4.0/unified/20170816.011601~6^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58d1f1740c38ad7ef9b132a7c357fcf3ff74219b;p=platform%2Fcore%2Fapi%2Fapp-control.git Add exception handlings The event value can be NULL pointer. Change-Id: I13442933a17643cd213185dfc0f7e9eb894f97a8 Signed-off-by: Hwankyu Jhun --- diff --git a/app_common/app_event.c b/app_common/app_event.c index fe32e89..d64227a 100755 --- a/app_common/app_event.c +++ b/app_common/app_event.c @@ -125,7 +125,7 @@ int app_event_get_low_battery_status(app_event_info_h event_info, app_event_low_ int app_event_get_language(app_event_info_h event_info, char **lang) { - if (event_info == NULL || lang == NULL) + if (event_info == NULL || event_info->value == NULL || lang == NULL) return app_error(APP_ERROR_INVALID_PARAMETER, __FUNCTION__, "null parameter"); if (event_info->type != APP_EVENT_LANGUAGE_CHANGED) @@ -138,7 +138,7 @@ int app_event_get_language(app_event_info_h event_info, char **lang) int app_event_get_region_format(app_event_info_h event_info, char **region) { - if (event_info == NULL || region == NULL) + if (event_info == NULL || event_info->value == NULL || region == NULL) return app_error(APP_ERROR_INVALID_PARAMETER, __FUNCTION__, "null parameter"); if (event_info->type != APP_EVENT_REGION_FORMAT_CHANGED)