Don't keep a reference into the hash while modifying it

Change-Id: I8c7e180a3bc640a63c183f460918914265a2a31b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Lars Knoll 2020-03-30 10:52:24 +02:00
parent e0b89899e3
commit ed2e091d0d

View File

@ -1818,7 +1818,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, int element, quint6
cacheIt = cache.constFind(state & stateMask);
if (cacheIt != cache.constEnd()) {
const QRenderRule &newRule = cacheIt.value();
QRenderRule newRule = cacheIt.value();
cache[state] = newRule;
return newRule;
}