diff --git a/src/esp/gfx/replay/Player.cpp b/src/esp/gfx/replay/Player.cpp index d4335f2af4..c3cfa9bdfa 100644 --- a/src/esp/gfx/replay/Player.cpp +++ b/src/esp/gfx/replay/Player.cpp @@ -248,8 +248,13 @@ void Player::applyKeyframe(const Keyframe& keyframe) { for (const auto& pair : keyframe.metadata) { const auto& instanceKey = pair.first; - implementation_->setNodeMetadata(createdInstances_[instanceKey], - pair.second); + const auto& it = createdInstances_.find(instanceKey); + if (it == createdInstances_.end()) { + // Missing instance for this key due to a failed instance creation + continue; + } + auto* node = it->second; + implementation_->setNodeMetadata(node, pair.second); creationRecords_[instanceKey].metadata = pair.second; }