Skip to content

Commit ce1a9a8

Browse files
committedJul 2, 2013
Topology checker: No double-delete of rubberbands (Fix #8095)
1 parent 5020441 commit ce1a9a8

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed
 

‎src/plugins/topology/checkDock.cpp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,8 @@ void checkDock::deleteErrors()
150150
mErrorList.clear();
151151
mErrorListModel->resetModel();
152152

153-
QList<QgsRubberBand*>::const_iterator rit;
154-
155-
for ( rit = mRbErrorMarkers.begin(); rit != mRbErrorMarkers.end(); ++rit )
156-
{
157-
QgsRubberBand* rb = *rit;
158-
rb->reset();
159-
delete rb;
160-
}
153+
qDeleteAll( mRbErrorMarkers );
154+
mRbErrorMarkers.clear();
161155
}
162156

163157
void checkDock::parseErrorListByLayer( QString layerId )
@@ -397,14 +391,7 @@ void checkDock::validate( ValidateType type )
397391
{
398392
mErrorList.clear();
399393

400-
QList<QgsRubberBand*>::const_iterator it;
401-
for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
402-
{
403-
QgsRubberBand* rb = *it;
404-
rb->reset();
405-
delete rb;
406-
}
407-
394+
qDeleteAll( mRbErrorMarkers );
408395
mRbErrorMarkers.clear();
409396

410397
runTests( type );

0 commit comments

Comments
 (0)
Please sign in to comment.