diff --git a/File_Format_Library/FileFormats/Layout/Common.cs b/File_Format_Library/FileFormats/Layout/Common.cs index 1e379018..59828872 100644 --- a/File_Format_Library/FileFormats/Layout/Common.cs +++ b/File_Format_Library/FileFormats/Layout/Common.cs @@ -2008,7 +2008,7 @@ namespace LayoutBXLYT public void RemoveNodeWrapper() { - if (NodeWrapper.Parent != null) + if (NodeWrapper != null && NodeWrapper.Parent != null) { var parent = NodeWrapper.Parent; parent.Nodes.Remove(NodeWrapper);