Fix Interface crash importing JSON with duplicate entity IDs in file

This commit is contained in:
David Rowe 2018-10-23 15:30:33 +13:00
parent e125107a9f
commit 794767144f

View file

@ -2752,11 +2752,13 @@ bool EntityTree::readFromMap(QVariantMap& map) {
success = false;
}
if (entity) {
const QUuid& cloneOriginID = entity->getCloneOriginID();
if (!cloneOriginID.isNull()) {
cloneIDs[cloneOriginID].push_back(entity->getEntityItemID());
}
}
}
for (const auto& entityID : cloneIDs.keys()) {
auto entity = findEntityByID(entityID);