Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Amalgam/SBFDSColumnData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ void SBFDSColumnData::ChangeIndexValue(EvaluableNodeImmediateValueType new_value
{
auto [new_size_entry, inserted] = valueCodeSizeToIndices.emplace(new_code_size, nullptr);

//need to emplace above before searching to ensure new_size_entry does not become invalidated
auto old_size_entry = valueCodeSizeToIndices.find(old_code_size);
if(old_size_entry == end(valueCodeSizeToIndices))
{
Expand All @@ -387,7 +388,7 @@ void SBFDSColumnData::ChangeIndexValue(EvaluableNodeImmediateValueType new_value
//TODO 24298: ensure index size is always correct and updated so entities won't be missed, remove this code and assert false if not found
for(auto cur_id_entry = begin(valueCodeSizeToIndices); cur_id_entry != end(valueCodeSizeToIndices); ++cur_id_entry)
{
if(cur_id_entry->second->contains(index))
if(cur_id_entry->second != nullptr && cur_id_entry->second->contains(index))
{
old_size_entry = cur_id_entry;
break;
Expand Down