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,9 +2752,11 @@ bool EntityTree::readFromMap(QVariantMap& map) {
success = false;
}
const QUuid& cloneOriginID = entity->getCloneOriginID();
if (!cloneOriginID.isNull()) {
cloneIDs[cloneOriginID].push_back(entity->getEntityItemID());
if (entity) {
const QUuid& cloneOriginID = entity->getCloneOriginID();
if (!cloneOriginID.isNull()) {
cloneIDs[cloneOriginID].push_back(entity->getEntityItemID());
}
}
}