From 76228909a63a4dad620085380d8e087d4a0fa8cc Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 1 Sep 2016 16:27:50 +0900 Subject: [PATCH] Add an exception handling about getting shared data path Change-Id: I1626c411af12d7de5574e52d97481546ad35fec5 Signed-off-by: Hwankyu Jhun --- src/app_manager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app_manager.c b/src/app_manager.c index cf07aad..6f516b2 100644 --- a/src/app_manager.c +++ b/src/app_manager.c @@ -269,8 +269,12 @@ API int app_manager_is_running(const char *app_id, bool *running) API int app_manager_get_shared_data_path(const char *app_id, char **path) { int r; - int retval = aul_get_app_shared_data_path_by_appid(app_id, path); + int retval; + + if (app_id == NULL || path == NULL) + return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); + retval = aul_get_app_shared_data_path_by_appid(app_id, path); switch (retval) { case AUL_R_OK: r = APP_MANAGER_ERROR_NONE; -- 2.7.4