From 2a4f4d69900109ef8bf48e091577e19d5e2c3c91 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 16 Aug 2013 11:16:15 +0200 Subject: [PATCH] fix crash at undo in digitize --- src/app/qgsmaptoolcapture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/qgsmaptoolcapture.cpp b/src/app/qgsmaptoolcapture.cpp index ad8dc59b5e96..25639a82a996 100644 --- a/src/app/qgsmaptoolcapture.cpp +++ b/src/app/qgsmaptoolcapture.cpp @@ -245,11 +245,11 @@ void QgsMapToolCapture::undo() mRubberBand->removePoint( -1 ); - if ( rubberBandSize > 0 ) + if ( rubberBandSize > 1 ) { if ( tempRubberBandSize > 1 ) { - const QgsPoint *point = mRubberBand->getPoint( 0, rubberBandSize - 1 ); + const QgsPoint *point = mRubberBand->getPoint( 0, rubberBandSize - 2 ); mTempRubberBand->movePoint( tempRubberBandSize - 2, *point ); } }