Remove double lookup

This commit is contained in:
Aleix Pol 2017-11-20 16:13:46 +01:00
parent 3e17a2d0a2
commit 28d9c7146e

View File

@ -49,8 +49,9 @@ ColorScope::~ColorScope()
ColorScope *ColorScope::qmlAttachedProperties(QObject *object)
{
if (ColorScope::s_attachedScopes.contains(object)) {
return s_attachedScopes.value(object);
const auto cs = s_attachedScopes.value(object);
if (cs) {
return cs;
}
ColorScope *s = new ColorScope(0, object);