remove the iterator after accessing it

This commit is contained in:
Marco Martin 2011-11-29 15:53:17 +01:00
parent e7ffcacf1f
commit 58b6cc3e43

View File

@ -331,10 +331,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();
}
}