From bd3c03950a2e2bf341d54d52e36843434709cbec Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 15 Jan 2019 11:33:10 +0900 Subject: [PATCH] Add an exception handling This patch adds checking whether the parameter is nullptr or not. Change-Id: I35e45198125fecca980257a00421f06c435787ac Signed-off-by: Hwankyu Jhun --- src/app_control.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app_control.c b/src/app_control.c index 49bfa7c..75da24a 100644 --- a/src/app_control.c +++ b/src/app_control.c @@ -286,6 +286,11 @@ int app_control_create_with_parameters(app_control_h *app_control, char *val; char *key; + if (app_control == NULL) { + return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, + __FUNCTION__, "Invalid prameter"); + } + ret = app_control_create_request(NULL, &tmp_control); if (ret != APP_CONTROL_ERROR_NONE) return ret; -- 2.7.4