From: mk5004lee <37102375+mk5004lee@users.noreply.github.com> Date: Thu, 17 Jan 2019 02:31:07 +0000 (+0900) Subject: [Notification] Fix Deref after as.instant issue (#665) X-Git-Tag: submit/tizen_5.0/20190118.000300~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a82ece69a3dd7870daa05e40d3a0be64dd0deb7;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Notification] Fix Deref after as.instant issue (#665) Signed-off-by: mk5004.lee --- diff --git a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationButtonActionArgsBinder.cs b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationButtonActionArgsBinder.cs index e252015d1..87fa94aa4 100755 --- a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationButtonActionArgsBinder.cs +++ b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationButtonActionArgsBinder.cs @@ -51,8 +51,12 @@ namespace Tizen.Applications.NotificationEventListener if (isExisted) { - (eventargs.Style["Active"] as NotificationEventArgs.ActiveStyleArgs).Button.Add(button); + NotificationEventArgs.ActiveStyleArgs activeStyle = eventargs.Style["Active"] as NotificationEventArgs.ActiveStyleArgs; + if (activeStyle != null) + { + activeStyle.Button.Add(button); + } } } } -} \ No newline at end of file +} diff --git a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationReplyActionArgsBinder.cs b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationReplyActionArgsBinder.cs index 98a9da95f..e45b21e23 100755 --- a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationReplyActionArgsBinder.cs +++ b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationReplyActionArgsBinder.cs @@ -94,7 +94,11 @@ namespace Tizen.Applications.NotificationEventListener if (isExisted) { - (eventargs.Style["Active"] as NotificationEventArgs.ActiveStyleArgs).Reply = reply; + NotificationEventArgs.ActiveStyleArgs activeStyle = eventargs.Style["Active"] as NotificationEventArgs.ActiveStyleArgs; + if (activeStyle != null) + { + activeStyle.Reply = reply; + } } } }