Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

Commented Unassigned: Null Pointer crash on unloading docking manager [16840]

$
0
0
Hi, I experience a crash with the docking manager when it gets unloaded. For one reason or another, the variable _autoHideWindowManager is null, so the call to HideAutoWindow in the DockingManager_Unloaded method crashes the application.

I modified the code on my side by adding the null pointer check, and now it seems to be ok.

```
void DockingManager_Unloaded(object sender, RoutedEventArgs e)
{

if (!DesignerProperties.GetIsInDesignMode(this))
{
if (_autoHideWindowManager != null)
{
_autoHideWindowManager.HideAutoWindow();
}

foreach (var fw in _fwList.ToArray())
{
//fw.Owner = null;
fw.SetParentWindowToNull();
fw.KeepContentVisibleOnClose = true;
fw.Close();
}

DestroyOverlayWindow();
FocusElementManager.FinalizeFocusManagement(this);
}
}
```
DockingManager.cs


If you guys could integrate this null check in your code we could continue to get the official release from you guys.

Thanks to let us know if you will integrate it or not.
Comments: ** Comment from web user: steffp **

This seems a duplicate with this [workitem](https://avalondock.codeplex.com/workitem/15962). We too like to have it fixed.


Viewing all articles
Browse latest Browse all 2690

Trending Articles