Skip to content

Use is pattern and check for valid index - #554

Merged
sharpSteff merged 4 commits into
Dirkster99:masterfrom
bbuerger:master
Apr 30, 2026
Merged

sharpSteff merged 4 commits into
Dirkster99:masterfrom
bbuerger:master

Conversation

@bbuerger

@bbuerger bbuerger commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Improve null and collection iteration safety

Benny Bürger added 4 commits April 29, 2026 10:01
Added null checks in `DragService.cs` and `OverlayWindow.cs` to prevent potential null reference exceptions. Updated `DockingManager.cs` to safely iterate over collections by using `.ToArray()` to avoid modification during enumeration.
Ensure `UpdateDragPosition` method checks for null on `Model?.Root?.Manager` before initializing `_dragService`. This prevents potential null reference exceptions.
@sharpSteff

Copy link
Copy Markdown
Collaborator

Thanks for the PR

@sharpSteff
sharpSteff merged commit 0d6bd81 into Dirkster99:master Apr 30, 2026
1 check passed
gerleim added a commit to gerleim/AvalonDock that referenced this pull request Jun 17, 2026
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.

2 participants