Переглянути джерело

Fixed crash moving mouuse in All Views Tester

Tig 1 рік тому
батько
коміт
94749e428e
1 змінених файлів з 4 додано та 0 видалено
  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);