From 27fe9eeb7d9777775fd2356d501f1c23a39cf8e6 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Wed, 21 Feb 2024 02:45:23 -0700 Subject: [PATCH] Use proper null check pattern --- Terminal.Gui/Application.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Application.cs b/Terminal.Gui/Application.cs index 5eb417840..3c13ccff6 100644 --- a/Terminal.Gui/Application.cs +++ b/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 top must be moved above the first not running Toplevel. - if (OverlappedTop != null + if (OverlappedTop is { } && top != OverlappedTop && top != Current && Current?.Running == false