Skip to content

Commit

Permalink
Fix for #6937, ensure QgsRubberBand is deleted if no active vector layer
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Jan 1, 2013
1 parent 2b80d63 commit a385162
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsmaptoolselectrectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ void QgsMapToolSelectRectangle::canvasReleaseEvent( QMouseEvent *e )
QgsVectorLayer* vlayer = QgsMapToolSelectUtils::getCurrentVectorLayer( mCanvas );
if ( vlayer == NULL )
{
if ( mRubberBand )
{
mRubberBand->reset( QGis::Polygon );
delete mRubberBand;
mRubberBand = 0;
mDragging = false;
}
return;
}

Expand Down

0 comments on commit a385162

Please sign in to comment.