Fix not supporting nullptr scriptstrings

This commit is contained in:
Jan
2021-12-30 16:51:16 +01:00
parent 7283cc5640
commit 538c4be839
20 changed files with 209 additions and 142 deletions

View File

@ -98,8 +98,8 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
// Make sure any used script string is available in the created zone
// The replacement of the scr_string_t values will be done upon writing
for(auto scrString : existingAsset->m_used_script_strings)
m_context.m_zone->m_script_strings.AddOrGetScriptString(existingAsset->m_zone->m_script_strings[scrString]);
for(const auto scrString : existingAsset->m_used_script_strings)
m_context.m_zone->m_script_strings.AddOrGetScriptString(existingAsset->m_zone->m_script_strings.CValue(scrString));
AddAsset(existingAsset->m_type, existingAsset->m_name, existingAsset->m_ptr, std::move(dependencies), existingAsset->m_used_script_strings, existingAsset->m_zone);
auto* lastDependency = m_last_dependency_loaded;