diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2017-03-20 17:10:57 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2017-03-20 17:10:57 +0900 |
commit | 58d1f1740c38ad7ef9b132a7c357fcf3ff74219b (patch) | |
tree | 82ae99b230ed1e3e6c13eb35a53a7641c71f6eea | |
parent | 9304e01a396bdee904078daf73d7b38bd17cdad8 (diff) | |
download | application-58d1f1740c38ad7ef9b132a7c357fcf3ff74219b.tar.gz application-58d1f1740c38ad7ef9b132a7c357fcf3ff74219b.tar.bz2 application-58d1f1740c38ad7ef9b132a7c357fcf3ff74219b.zip |
Add exception handlings
The event value can be NULL pointer.
Change-Id: I13442933a17643cd213185dfc0f7e9eb894f97a8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rwxr-xr-x | app_common/app_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |