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 committed by spherallic
parent b17f738f13
commit fecb6aad8f
2 changed files with 6 additions and 3 deletions

View file

@ -2195,7 +2195,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Clear selection info
General.Interface.DisplayStatus(StatusType.Selection, string.Empty);
if (highlighted != null && !highlighted.IsDisposed)
highlightasso.Set(highlighted);
//mxd. Update
UpdateOverlaySurfaces();
UpdateEffectLabels();

View file

@ -779,10 +779,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