remove the iterator after accessing it
This commit is contained in:
parent
e7ffcacf1f
commit
58b6cc3e43
@ -331,10 +331,10 @@ void DataEngine::removeAllSources()
|
|||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
Plasma::DataContainer *s = it.value();
|
Plasma::DataContainer *s = it.value();
|
||||||
it.remove();
|
|
||||||
s->disconnect(this);
|
s->disconnect(this);
|
||||||
s->deleteLater();
|
s->deleteLater();
|
||||||
emit sourceRemoved(it.key());
|
emit sourceRemoved(it.key());
|
||||||
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user