Merge pull request #14256 from ctrlaltdavid/M17008

Fix Interface crash importing JSON with duplicate entity IDs in file
This commit is contained in:
Ryan Huffman 2018-11-08 11:04:43 -08:00 committed by GitHub
commit 1ff644b619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2767,9 +2767,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());
}
}
}