Don't dereference a possibly-invalid optional
This commit is contained in:
parent
ec45855aed
commit
24cd174a23
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue