diff --git a/src/Dock.Avalonia/Internal/DockControlState.cs b/src/Dock.Avalonia/Internal/DockControlState.cs index 809ae3d45..91fcf9392 100644 --- a/src/Dock.Avalonia/Internal/DockControlState.cs +++ b/src/Dock.Avalonia/Internal/DockControlState.cs @@ -140,9 +140,14 @@ private void Execute(Point point, DockOperation operation, DragAction dragAction if (_state.DragControl.DataContext is IDockable sourceDockable && _state.DropControl.DataContext is IDockable targetDockable) { if (sourceDockable is IDock dock) + { sourceDockable = dock.ActiveDockable; + } + if (sourceDockable == null) + { return; + } DockManager.Position = DockHelpers.ToDockPoint(point);