From: Pawel Andruszkiewicz
Date: Fri, 25 Mar 2016 13:16:59 +0000 (+0100)
Subject: [Notification] Fixed check for nullptr.
X-Git-Tag: submit/tizen/20160328.090426^2~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05ceede59f054193e02555852b6c1c90dcf9c879;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Notification] Fixed check for nullptr.
Fixes: SVACE 59695
[Verification] TCT pass rate 100% (85/85/0/0/0)
Change-Id: Iccb8d0be2c121a03e842b1d8582173df06f58497
Signed-off-by: Pawel Andruszkiewicz
---
diff --git a/src/notification/status_notification.cc b/src/notification/status_notification.cc
index cdb8e0a2..894b4327 100644
--- a/src/notification/status_notification.cc
+++ b/src/notification/status_notification.cc
@@ -152,7 +152,7 @@ PlatformResult StatusNotification::Create(notification_type_e noti_type,
notification_h* noti_handle) {
LoggerD("Enter");
*noti_handle = notification_create(noti_type);
- if (!noti_handle) {
+ if (!*noti_handle) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR,
"Cannot make new notification object");
}
@@ -1160,7 +1160,7 @@ PlatformResult StatusNotification::FromJson(const picojson::object& args,
if (app_control) {
app_control_destroy(app_control);
}
- free(noti_handle);
+ notification_free(noti_handle);
};
if (is_update) {