From: Sangyoon Jang Date: Tue, 7 Jun 2016 04:32:11 +0000 (+0900) Subject: Fix crash when event callback is not set X-Git-Tag: accepted/tizen/common/20160607.194653^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe941fe67c11b8812c3575dd9781ee36d217cfd8;p=platform%2Fcore%2Fappfw%2Fslp-pkgmgr.git Fix crash when event callback is not set Change-Id: I660591bcfe8c30f62cd6c1700154d019d4e8c08e Signed-off-by: Sangyoon Jang --- diff --git a/client/src/pkgmgr.c b/client/src/pkgmgr.c index d98862d..2766244 100644 --- a/client/src/pkgmgr.c +++ b/client/src/pkgmgr.c @@ -399,7 +399,7 @@ static void __operation_callback(void *cb_data, uid_t target_uid, } /* call callback */ - if (appid != NULL && strlen(appid) != 0) { + if (appid != NULL && strlen(appid) != 0 && cb_info->app_event_cb) { /* run app callback */ if (pc->new_event_cb) cb_info->app_event_cb(target_uid, cb_info->request_id, @@ -409,7 +409,7 @@ static void __operation_callback(void *cb_data, uid_t target_uid, cb_info->app_event_cb(target_uid, cb_info->request_id, pkg_type, pkgid, appid, key, val, NULL, cb_info->data); - } else { + } else if (cb_info->event_cb) { /* run pkg callback */ if (pc->new_event_cb) cb_info->event_cb(target_uid, cb_info->request_id,