Showing with 4 additions and 4 deletions.
  1. +4 −4 src/app/qgsmaptoolcapture.cpp
8 changes: 4 additions & 4 deletions src/app/qgsmaptoolcapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ void QgsMapToolCapture::undo()

mRubberBand->removePoint( -1 );

if ( mRubberBand->numberOfVertices() > 0 )
if ( rubberBandSize > 0 )
{
if ( mTempRubberBand->numberOfVertices() > 1 )
if ( tempRubberBandSize > 1 )
{
const QgsPoint *point = mRubberBand->getPoint( 0, mRubberBand->numberOfVertices() - 1 );
mTempRubberBand->movePoint( mTempRubberBand->numberOfVertices() - 2, *point );
const QgsPoint *point = mRubberBand->getPoint( 0, rubberBandSize - 1 );
mTempRubberBand->movePoint( tempRubberBandSize - 2, *point );
}
}
else
Expand Down