2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-07 17:31:49 +00:00

Merge pull request #640 from Laupetin/fix/indirect-reference-warning

fix: do not try to add indirect asset references without name
This commit is contained in:
Jan
2026-01-03 21:33:09 +01:00
committed by GitHub
2 changed files with 1 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ void BaseAssetMarker::MarkArray_ScriptString(scr_string_t* scriptStringArray, co
void BaseAssetMarker::Mark_IndirectAssetRef(const asset_type_t assetType, const char* assetName) const void BaseAssetMarker::Mark_IndirectAssetRef(const asset_type_t assetType, const char* assetName) const
{ {
if (!assetName) if (!assetName || !assetName[0])
return; return;
m_visitor.Visit_IndirectAssetRef(assetType, assetName); m_visitor.Visit_IndirectAssetRef(assetType, assetName);

View File

@@ -78,8 +78,5 @@ std::optional<scr_string_t> AssetInfoCollector::Visit_ScriptString(scr_string_t
void AssetInfoCollector::Visit_IndirectAssetRef(asset_type_t assetType, const char* assetName) void AssetInfoCollector::Visit_IndirectAssetRef(asset_type_t assetType, const char* assetName)
{ {
if (!assetName || !assetName[0])
return;
m_indirect_asset_references.emplace(assetType, assetName); m_indirect_asset_references.emplace(assetType, assetName);
} }