mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
Fixed a bug that sometimes caused a crash on undo
This commit is contained in:
parent
442bf3c278
commit
d45b61f041
1 changed files with 6 additions and 6 deletions
|
@ -97,12 +97,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Already set isdisposed so that changes can be prohibited
|
||||
isdisposed = true;
|
||||
|
||||
if(map == General.Map.Map)
|
||||
General.Map.UndoRedo.RecRemVertex(this);
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveVertex(listindex);
|
||||
|
||||
if(map.AutoRemove)
|
||||
{
|
||||
// Dispose the lines that are attached to this vertex
|
||||
|
@ -115,6 +109,12 @@ namespace CodeImp.DoomBuilder.Map
|
|||
foreach(Linedef ld in linedefs) ld.DetachVertexP(this);
|
||||
}
|
||||
|
||||
if(map == General.Map.Map)
|
||||
General.Map.UndoRedo.RecRemVertex(this);
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveVertex(listindex);
|
||||
|
||||
// Clean up
|
||||
linedefs = null;
|
||||
map = null;
|
||||
|
|
Loading…
Reference in a new issue