소스 검색

SuperView is not always a TopLevel - causing a cast exception

Charlie Kindel 5 년 전
부모
커밋
d26b9bdfe9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;