diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs index 29333044..1c27aa13 100755 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs @@ -152,6 +152,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Reset settings points.Clear(); + gridpoints.Clear(); labels.Clear(); drawingautoclosed = false; diff --git a/Source/Plugins/UDBScript/API/ThingWrapper.cs b/Source/Plugins/UDBScript/API/ThingWrapper.cs index ed7f3070..062a73f4 100644 --- a/Source/Plugins/UDBScript/API/ThingWrapper.cs +++ b/Source/Plugins/UDBScript/API/ThingWrapper.cs @@ -515,6 +515,8 @@ namespace CodeImp.DoomBuilder.UDBScript.Wrapper public SectorWrapper getSector() { thing.DetermineSector(); + if (thing.Sector == null) + return null; return new SectorWrapper(thing.Sector); } diff --git a/Source/Plugins/UDBScript/Controls/ScriptDockerControl.cs b/Source/Plugins/UDBScript/Controls/ScriptDockerControl.cs index 66fd7424..19fe3565 100644 --- a/Source/Plugins/UDBScript/Controls/ScriptDockerControl.cs +++ b/Source/Plugins/UDBScript/Controls/ScriptDockerControl.cs @@ -243,6 +243,7 @@ namespace CodeImp.DoomBuilder.UDBScript if (result != null) { filetree.SelectedNodes.Add(result); + result.EnsureVisible(); break; } }