Fix Deref after as.instant issue (#660)
authormk5004lee <37102375+mk5004lee@users.noreply.github.com>
Thu, 17 Jan 2019 00:05:36 +0000 (09:05 +0900)
committerpjh9216 <jh9216.park@samsung.com>
Thu, 17 Jan 2019 00:05:36 +0000 (09:05 +0900)
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationButtonActionArgsBinder.cs
src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationReplyActionArgsBinder.cs

index e252015..87fa94a 100755 (executable)
@@ -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
+}
index 98a9da9..e45b21e 100755 (executable)
@@ -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;
+                }
             }
         }
     }