Skip to content

Skip mouse events of unloaded controls#454

Open
Khaos66 wants to merge 1 commit intoDirkster99:masterfrom
Software-Schmiede-SWS:MouseMoveNPE
Open

Skip mouse events of unloaded controls#454
Khaos66 wants to merge 1 commit intoDirkster99:masterfrom
Software-Schmiede-SWS:MouseMoveNPE

Conversation

@Khaos66
Copy link
Contributor

@Khaos66 Khaos66 commented Sep 6, 2023

Somehow mouse events are fired for unloaded tabitems resulting in a NullReferenceException

at AvalonDock.Controls.TransformExtensions.PointToScreenDPI(Visual visual, Point pt)
   at AvalonDock.Controls.TransformExtensions.GetScreenArea(FrameworkElement element)
   at AvalonDock.Controls.LayoutDocumentTabItem.UpdateDragDetails()
   at AvalonDock.Controls.LayoutDocumentTabItem.OnMouseMove(MouseEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
...

This fixes the exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant