Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip mouse events of unloaded controls #454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant