Explorar o código

Merge pull request #768 from daltskin/master

Adding some null checks
Charlie Kindel %!s(int64=5) %!d(string=hai) anos
pai
achega
6bba29813f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Terminal.Gui/Core/View.cs

+ 2 - 2
Terminal.Gui/Core/View.cs

@@ -695,7 +695,6 @@ namespace Terminal.Gui {
 
 			while (subviews.Count > 0) {
 				Remove (subviews [0]);
-				Remove (tabIndexes [0]);
 			}
 		}
 
@@ -1186,7 +1185,8 @@ namespace Terminal.Gui {
 		{
 			var clipRect = new Rect (Point.Empty, frame.Size);
 
-			Driver.SetAttribute (HasFocus ? ColorScheme.Focus : ColorScheme.Normal);
+			if (ColorScheme != null)
+				Driver.SetAttribute (HasFocus ? ColorScheme.Focus : ColorScheme.Normal);
 
 			if (!ustring.IsNullOrEmpty (Text)) {
 				Clear ();