From: Hwankyu Jhun Date: Thu, 14 Jul 2016 02:18:19 +0000 (+0900) Subject: Fix the exception about getting the file name X-Git-Tag: submit/tizen/20160714.000614^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6297b39601a770d4ef84a9913cab471d7b8171c4;p=platform%2Fcore%2Fappfw%2Fdebug-launchpad.git Fix the exception about getting the file name Change-Id: Ib3ff3c69e01d7e8fbbbfc080078fbc122cce5070 Signed-off-by: Hwankyu Jhun --- diff --git a/src/debug-launchpad.c b/src/debug-launchpad.c index 9c58d1b..f7b7f46 100644 --- a/src/debug-launchpad.c +++ b/src/debug-launchpad.c @@ -119,8 +119,14 @@ static int __prepare_exec(const char *appid, const char *app_path, return -1; } - file_name = strrchr(app_path, '/') + 1; + file_name = strrchr(app_path, '/'); if (file_name == NULL) { + _D("file_name is NULL"); + return -1; + } + + file_name++; + if (*file_name == '\0') { _D("can't locate file name to execute"); return -1; }