Merge pull request #764 from Azaezel/alpha40/logNo_foundAssetcount

getAssetIdByFilename loaded state fix
This commit is contained in:
Brian Roberts 2022-04-10 17:44:28 -05:00 committed by GitHub
commit 02864095ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -219,6 +219,11 @@ StringTableEntry ImageAsset::getAssetIdByFilename(StringTableEntry fileName)
//acquire and bind the asset, and return it out
imageAssetId = query.mAssetList[0];
}
else
{
AssetPtr<ImageAsset> imageAsset = imageAssetId;
imageAsset->mLoadedState = AssetErrCode::BadFileReference;
}
return imageAssetId;
}

View file

@ -473,6 +473,11 @@ StringTableEntry ShapeAsset::getAssetIdByFilename(StringTableEntry fileName)
//acquire and bind the asset, and return it out
shapeAssetId = query.mAssetList[0];
}
else
{
AssetPtr<ShapeAsset> shapeAsset = shapeAssetId;
shapeAsset->mLoadedState = AssetErrCode::BadFileReference;
}
return shapeAssetId;
}