Skip to content

Commit

Permalink
Fix segfault in gfx-replay when there's an invalid path. (#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
0mdc authored Jan 24, 2025
1 parent 1278a08 commit c97b2ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/esp/gfx/replay/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c97b2ac

Please sign in to comment.