File tree Expand file tree Collapse file tree
src/OneWare.Core/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,8 +130,13 @@ public override void FloatDockable(IDockable dockable)
130130 base . FloatDockable ( dockable ) ;
131131 }
132132
133- public override void CloseDockable ( IDockable dockable )
133+ public override void CloseDockable ( IDockable ? dockable )
134134 {
135+ // When closing a floating window in Windows, the method might get called with a null dockable
136+ // This is likely a bug with the dock library
137+ // We check it to prevent a crash
138+ if ( dockable == null ) return ;
139+
135140 try
136141 {
137142 base . CloseDockable ( dockable ) ;
@@ -149,9 +154,9 @@ public override void CloseDockable(IDockable dockable)
149154 }
150155 }
151156
152- private void SafeRemoveDockable ( IDockable dockable )
157+ private void SafeRemoveDockable ( IDockable ? dockable )
153158 {
154- if ( dockable . Owner is IDock { VisibleDockables : { } dockables } &&
159+ if ( dockable ? . Owner is IDock { VisibleDockables : { } dockables } &&
155160 dockables . Contains ( dockable ) )
156161 {
157162 dockables . Remove ( dockable ) ;
You can’t perform that action at this time.
0 commit comments