From: Myungki Lee Date: Tue, 8 Nov 2016 10:30:23 +0000 (+0900) Subject: Can set NULL to path of image X-Git-Tag: submit/tizen_3.0/20161108.101813^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bcbe5db3b3267eee52ff32cf7540aeff1dd345f;p=platform%2Fcore%2Fapi%2Fnotification.git Can set NULL to path of image - When the image type has a path Change-Id: I3e99b854580ea67cacf5a7dce97c8fe2c8b0a40b Signed-off-by: Myungki Lee --- diff --git a/src/notification.c b/src/notification.c index 0837948f..9a1aaca9 100755 --- a/src/notification.c +++ b/src/notification.c @@ -95,14 +95,14 @@ char *notification_get_pkgname_by_pid(void) } EXPORT_API int notification_set_image(notification_h noti, - notification_image_type_e type, - const char *image_path) + notification_image_type_e type, + const char *image_path) { bundle *b = NULL; char buf_key[32] = { 0, }; char *ret_val = NULL; - if (noti == NULL || image_path == NULL) + if (noti == NULL) return NOTIFICATION_ERROR_INVALID_PARAMETER; if (type <= NOTIFICATION_IMAGE_TYPE_NONE @@ -118,8 +118,12 @@ EXPORT_API int notification_set_image(notification_h noti, if (ret_val != NULL) bundle_del(b, buf_key); - bundle_add_str(b, buf_key, image_path); + if (image_path != NULL) + bundle_add_str(b, buf_key, image_path); } else { + if (image_path == NULL) + return NOTIFICATION_ERROR_NONE; + b = bundle_create(); snprintf(buf_key, sizeof(buf_key), "%d", type);