[NUI] Fix not to check non-nullable value (#2819)
authorJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 31 Mar 2021 09:02:32 +0000 (18:02 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 1 Apr 2021 01:07:37 +0000 (10:07 +0900)
NavigatorPages always contains non-nullable values.
Therefore, to resolve svace issue (DEREF_AFTER_NULL), null pointer check
is not done for non-nullable values.

Co-authored-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Co-authored-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs

index 1bf4f70..3d10f28 100755 (executable)
@@ -154,8 +154,8 @@ namespace Tizen.NUI.Components
             var newTop = NavigationPages[NavigationPages.Count - 2];
 
             //Invoke Page events
-            newTop?.InvokeAppearing();
-            curTop?.InvokeDisappearing();
+            newTop.InvokeAppearing();
+            curTop.InvokeDisappearing();
 
             //TODO: The following transition codes will be replaced with view transition.
             if (curAnimation)