Skip to content

Commit

Permalink
Topology checker: No double-delete of rubberbands (Fix #8095)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 2, 2013
1 parent 5020441 commit ce1a9a8
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/plugins/topology/checkDock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,8 @@ void checkDock::deleteErrors()
mErrorList.clear();
mErrorListModel->resetModel();

QList<QgsRubberBand*>::const_iterator rit;

for ( rit = mRbErrorMarkers.begin(); rit != mRbErrorMarkers.end(); ++rit )
{
QgsRubberBand* rb = *rit;
rb->reset();
delete rb;
}
qDeleteAll( mRbErrorMarkers );
mRbErrorMarkers.clear();
}

void checkDock::parseErrorListByLayer( QString layerId )
Expand Down Expand Up @@ -397,14 +391,7 @@ void checkDock::validate( ValidateType type )
{
mErrorList.clear();

QList<QgsRubberBand*>::const_iterator it;
for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
{
QgsRubberBand* rb = *it;
rb->reset();
delete rb;
}

qDeleteAll( mRbErrorMarkers );
mRbErrorMarkers.clear();

runTests( type );
Expand Down

0 comments on commit ce1a9a8

Please sign in to comment.