Sectors Mode: fixed a crash when merging sectors while a shared linedef between them was shown as an association

This commit is contained in:
biwa 2021-02-28 01:44:38 +01:00
parent 46c577b9e1
commit 5534a93051
2 changed files with 5 additions and 2 deletions

View file

@ -2087,6 +2087,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Clear selection info
General.Interface.DisplayStatus(StatusType.Selection, string.Empty);
if (highlighted != null && !highlighted.IsDisposed)
highlightasso.Set(highlighted);
// Recreate the blockmap
CreateBlockmap();

View file

@ -785,10 +785,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Plot()
{
foreach(Linedef ld in linedefs)
renderer.PlotLinedef(ld, General.Colors.Indication);
if(!ld.IsDisposed) renderer.PlotLinedef(ld, General.Colors.Indication);
foreach (Sector s in sectors)
renderer.PlotSector(s, General.Colors.Indication);
if(!s.IsDisposed) renderer.PlotSector(s, General.Colors.Indication);
}
// This compares an association