1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: don't use invalid reference after erasing element

Fix #5002
This commit is contained in:
Anthony Bilinski 2018-03-16 02:41:50 -07:00
parent 8198940607
commit 1afed5f72e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -127,7 +127,6 @@ void SmileyPack::cleanupIconsCache()
std::shared_ptr<QIcon>& icon = it->second;
if (icon.use_count() == 1) {
it = cachedIcon.erase(it);
icon.reset();
} else {
++it;
}