* Fix NullReferenceException in SeparatorCanMove (V110) - #4489
Open
Conversation
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
…ptonworkspaceseparatorcanmove-on-mouse-move-after-a-layout-removes-the-separator-under-the-mouse
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4485 on
master. Companion to theV105-LTSPR #4487.Problem
If a layout compacts away the sequence that owns a separator while the mouse is resting on that separator,
ViewManager.ActiveViewstill refers to the separator. On the next mouse moveMouseLeave->IsOperating->SeparatorCanMove->SeparatorToItemsdereferences the sequence's nullWorkspaceParentand throws.Fix
KryptonWorkspace.SeparatorCanMovereturnsfalsewhen the separator's item has noWorkspaceParent. 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
NullReferenceExceptionon the released 105 package. Built fornet10.0-windowsonly (local SDK cannot target net11).Note: Replaces PR #4488