Browse Source

fix tests.

pull/11502/head
Dan Walmsley 3 years ago
parent
commit
e2511344b8
  1. 2
      src/Avalonia.Base/Input/PointerEventArgs.cs

2
src/Avalonia.Base/Input/PointerEventArgs.cs

@ -72,7 +72,7 @@ namespace Avalonia.Input
// If the visual the user passed in, is not connected to the same visual root
// (i.e. they called it for a control inside a popup.
if (!ReferenceEquals(_rootVisual, relativeTo.VisualRoot))
if (!ReferenceEquals(_rootVisual, relativeTo.VisualRoot) && relativeTo.VisualRoot is { })
{
// Convert to absolute screen coordinates.
var screenPt = _rootVisual.PointToScreen(pt);

Loading…
Cancel
Save