Browse Source

Use proper null check pattern

Brandon Thetford 1 year ago
parent
commit
27fe9eeb7d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Application.cs

+ 1 - 1
Terminal.Gui/Application.cs

@@ -1208,7 +1208,7 @@ public static partial class Application
 
 
         // The Current and the top are both not running Toplevel then
         // The Current and the top are both not running Toplevel then
         // the top must be moved above the first not running Toplevel.
         // the top must be moved above the first not running Toplevel.
-        if (OverlappedTop != null
+        if (OverlappedTop is { }
             && top != OverlappedTop
             && top != OverlappedTop
             && top != Current
             && top != Current
             && Current?.Running == false
             && Current?.Running == false