QPMCache::remove(): Do not dereference erased iterator
Fixes a crash in tst_QGL::textureCleanup() (developer build).
Amends 467b15a20c
.
Change-Id: I7026b3c2a27c02a80b995fde67a832dc2d19031d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
13bceecc6b
commit
0e9ea94511
@ -383,8 +383,9 @@ bool QPMCache::remove(const QString &key)
|
||||
//The key was not in the cache
|
||||
if (cacheKey == cacheKeys.constEnd())
|
||||
return false;
|
||||
const bool result = QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(cacheKey.value());
|
||||
cacheKeys.erase(cacheKey);
|
||||
return QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(cacheKey.value());
|
||||
return result;
|
||||
}
|
||||
|
||||
bool QPMCache::remove(const QPixmapCache::Key &key)
|
||||
|
Loading…
Reference in New Issue
Block a user