[Notification] Fix Deref after as.instant issue (#665)
authormk5004lee <37102375+mk5004lee@users.noreply.github.com>
Thu, 17 Jan 2019 02:31:07 +0000 (11:31 +0900)
committerpjh9216 <jh9216.park@samsung.com>
Thu, 17 Jan 2019 02:31:07 +0000 (11:31 +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 e252015d162c7a6de7f91a85cbe3b283d0e5923c..87fa94aa4262e4ac069718b0ff2907875ccb8817 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 98a9da95fa41ed1b78e77b98fc8f21d788b0cae4..e45b21e23f765ec0514ab40b0327091e82f1c19d 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;
+                }
             }
         }
     }