diff --git a/source/Components/AvalonDock/Controls/LayoutDocumentTabItem.cs b/source/Components/AvalonDock/Controls/LayoutDocumentTabItem.cs index 99cd94e0..4171788d 100644 --- a/source/Components/AvalonDock/Controls/LayoutDocumentTabItem.cs +++ b/source/Components/AvalonDock/Controls/LayoutDocumentTabItem.cs @@ -69,7 +69,8 @@ public LayoutContent Model /// Provides derived classes an opportunity to handle changes to the property. protected virtual void OnModelChanged(DependencyPropertyChangedEventArgs e) { - SetLayoutItem(Model != null ? Model.Root.Manager.GetLayoutItemFromModel(Model) : null); + DockingManager manager = Model?.Root?.Manager; + SetLayoutItem(manager != null ? manager.GetLayoutItemFromModel(Model) : null); //UpdateLogicalParent(); }