Browse Source

SuperView is not always a TopLevel - causing a cast exception

Charlie Kindel 5 years ago
parent
commit
d26b9bdfe9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Core.cs

+ 1 - 1
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;