forked from qt-creator/qt-creator
BuildConfiguration: Check return value of fromMap
Change-Id: I18edefc20ff962720f36192121e3f6e341b1bcbc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -487,7 +487,10 @@ BuildConfiguration *IBuildConfigurationFactory::clone(Target *parent, BuildConfi
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
BuildConfiguration *bc = m_creator(parent);
|
BuildConfiguration *bc = m_creator(parent);
|
||||||
QVariantMap data = product->toMap();
|
QVariantMap data = product->toMap();
|
||||||
bc->fromMap(data);
|
if (!bc->fromMap(data)) {
|
||||||
|
delete bc;
|
||||||
|
bc = nullptr;
|
||||||
|
}
|
||||||
return bc;
|
return bc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user