Don't dereference a possibly-invalid optional

This commit is contained in:
Jon Evans 2021-04-05 19:34:49 -04:00
parent ec45855aed
commit 24cd174a23
1 changed files with 2 additions and 1 deletions

View File

@ -412,7 +412,8 @@ void DRAGGER::optimizeAndUpdateDraggedLine( LINE& aDragged, const LINE& aOrig, c
optimizer.SetRestrictArea( *affectedArea );
optimizer.Optimize( &aDragged );
OPT_BOX2I optArea = *aDragged.ChangedArea( &aOrig );
OPT_BOX2I optArea = aDragged.ChangedArea( &aOrig );
if( optArea )
Dbg()->AddBox( *optArea, 4 );
}