Add an exception handling about getting shared data path 42/86442/1 accepted/tizen/common/20160901.143553 accepted/tizen/ivi/20160901.104053 accepted/tizen/mobile/20160901.104008 accepted/tizen/tv/20160901.104022 accepted/tizen/wearable/20160901.104039 submit/tizen/20160901.074409
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Sep 2016 07:27:50 +0000 (16:27 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Sep 2016 07:28:31 +0000 (16:28 +0900)
Change-Id: I1626c411af12d7de5574e52d97481546ad35fec5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app_manager.c

index cf07aad..6f516b2 100644 (file)
@@ -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;