remove the iterator after accessing it

This commit is contained in:
Marco Martin 2011-11-29 15:53:17 +01:00 committed by Aaron Seigo
parent ea1f079c34
commit 523ef55a7b

View File

@ -302,10 +302,10 @@ void DataEngine::removeAllSources()
while (it.hasNext()) {
it.next();
Plasma::DataContainer *s = it.value();
it.remove();
s->disconnect(this);
s->deleteLater();
emit sourceRemoved(it.key());
it.remove();
}
}