mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
SuperView is not always a TopLevel - causing a cast exception
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user