[NUI] Fix SVACE issue (#449)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / XamlBinding / ContentPage.cs
index 3c2647a..1ddfc1e 100755 (executable)
@@ -162,10 +162,12 @@ namespace Tizen.NUI
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
-            Window.Instance.Remove(Root);
-            Root?.Dispose();
-            Root = null;
-
+            if(Root != null) 
+            {
+                Window.Instance.Remove(Root);
+                Root.Dispose();
+                Root = null;
+            }
             base.Dispose(type);
         }