From d26b9bdfe92970747dc26638d3c66ed7868c0953 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Thu, 21 May 2020 19:48:13 -0600 Subject: [PATCH] SuperView is not always a TopLevel - causing a cast exception --- Terminal.Gui/Core.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index 0b9582efc..8290c8eed 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -1649,7 +1649,7 @@ namespace Terminal.Gui { m = ((Toplevel)SuperView).HasMenuBar; int l = m ? 1 : 0; ny = Math.Max (y, l); - if (SuperView == null) + if (SuperView == null || SuperView.GetType() != typeof(Toplevel)) s = Application.Top.HasStatusBar; else s = ((Toplevel)SuperView).HasStatusBar;