Commit 016eea1d authored by Marco Martin's avatar Marco Martin

Fix iterator

Summary:
removing favorites crashed, next() has to be called
before accessing the item

Test Plan: crash--

Reviewers: #plasma, hein, ivan

Reviewed By: #plasma, ivan

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10177
parent 62d5627e
......@@ -335,10 +335,10 @@ public:
// Removing the entry from the cache
QMutableHashIterator<QString, AbstractEntry*> i(m_itemEntries);
while (i.hasNext()) {
i.next();
if (i.value() == entry) {
i.remove();
}
i.next();
}
delete entry;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment