BuildConfiguration: Check return value of fromMap

Change-Id: I18edefc20ff962720f36192121e3f6e341b1bcbc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Robert Loehning
2017-12-12 14:15:53 +01:00
parent b2a3884cf3
commit b054e1b1f5

View File

@@ -487,7 +487,10 @@ BuildConfiguration *IBuildConfigurationFactory::clone(Target *parent, BuildConfi
return nullptr;
BuildConfiguration *bc = m_creator(parent);
QVariantMap data = product->toMap();
bc->fromMap(data);
if (!bc->fromMap(data)) {
delete bc;
bc = nullptr;
}
return bc;
}