Explorar el Código

Prevents throw exception if Border is null.

BDisp hace 2 años
padre
commit
977f907cb4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Terminal.Gui/Core/Border.cs

+ 1 - 1
Terminal.Gui/Core/Border.cs

@@ -284,7 +284,7 @@ namespace Terminal.Gui {
 			/// <inheritdoc/>
 			public override void OnCanFocusChanged ()
 			{
-				if (Border.Child != null) {
+				if (Border?.Child != null) {
 					Border.Child.CanFocus = CanFocus;
 				}
 				base.OnCanFocusChanged ();