Browse Source

Fixed crash moving mouuse in All Views Tester

Tig 1 year ago
parent
commit
94749e428e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Terminal.Gui/View/Adornment/Adornment.cs

+ 4 - 0
Terminal.Gui/View/Adornment/Adornment.cs

@@ -203,6 +203,10 @@ public class Adornment : View
     /// <returns><see langword="true"/> if the specified Parent's SuperView-relative coordinates are within the Adornment's Thickness. </returns>
     public override bool Contains (int x, int y)
     {
+        if (Parent is null)
+        {
+            return false;
+        }
         Rectangle frame = Frame;
         frame.Offset (Parent.Frame.Location);