Skip to content

* Fix NullReferenceException in SeparatorCanMove (V110) - #4489

Open
PWagner1 wants to merge 2 commits into
alphafrom
V110-4485-bug-nullreferenceexception-in-kryptonworkspaceseparatorcanmove-on-mouse-move-after-a-layout-removes-the-separator-under-the-mouse
Open

PWagner1 wants to merge 2 commits into
alphafrom
V110-4485-bug-nullreferenceexception-in-kryptonworkspaceseparatorcanmove-on-mouse-move-after-a-layout-removes-the-separator-under-the-mouse

Conversation

@PWagner1

@PWagner1 PWagner1 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #4485 on master. Companion to the V105-LTS PR #4487.

Problem

If a layout compacts away the sequence that owns a separator while the mouse is resting on that separator, ViewManager.ActiveView still refers to the separator. On the next mouse move MouseLeave -> IsOperating -> SeparatorCanMove -> SeparatorToItems dereferences the sequence's null WorkspaceParent and throws.

Fix

KryptonWorkspace.SeparatorCanMove returns false when the separator's item has no WorkspaceParent. A detached separator cannot move.

Testing

Ran the single-file repro attached to the issue against this branch (project reference, Krypton.Workspace 110.26.10.276): no exception. The same repro throws the NullReferenceException on the released 105 package. Built for net10.0-windows only (local SDK cannot target net11).

Note: Replaces PR #4488

Fixes #4485 on `master`. Companion to the `V105-LTS` PR #4487.

## Problem
If a layout compacts away the sequence that owns a separator while the mouse is resting on that separator, `ViewManager.ActiveView` still refers to the separator. On the next mouse move `MouseLeave` -> `IsOperating` -> `SeparatorCanMove` -> `SeparatorToItems` dereferences the sequence's null `WorkspaceParent` and throws.

## Fix
`KryptonWorkspace.SeparatorCanMove` returns `false` when the separator's item has no `WorkspaceParent`. A detached separator cannot move.

## Testing
Ran the single-file repro attached to the issue against this branch (project reference, Krypton.Workspace 110.26.10.276): no exception. The same repro throws the `NullReferenceException` on the released 105 package. Built for `net10.0-windows` only (local SDK cannot target net11).

**Note:** Replaces PR #4488
@PWagner1 PWagner1 added this to the Version 110 milestone Oct 4, 2026
@PWagner1
PWagner1 requested a review from a team as a code owner October 4, 2026 14:26
@PWagner1 PWagner1 added area:workspace All issues to do with the workspace. version:110 All things to do with V110. labels Oct 4, 2026
…ptonworkspaceseparatorcanmove-on-mouse-move-after-a-layout-removes-the-separator-under-the-mouse

This branch has not been deployed

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

Labels

area:workspace All issues to do with the workspace. version:110 All things to do with V110.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant