Fix missing material instance load failure when parameters load fails

This commit is contained in:
Wojtek Figat
2024-12-29 23:21:26 +01:00
parent ab99a25cee
commit 3151e47722

View File

@@ -218,7 +218,11 @@ Asset::LoadResult MaterialInstance::load()
auto baseMaterial = Content::LoadAsync<MaterialBase>(baseMaterialId);
// Load parameters
Params.Load(&headerStream);
if (Params.Load(&headerStream))
{
LOG(Warning, "Cannot load material parameters.");
return LoadResult::CannotLoadData;
}
if (baseMaterial && !baseMaterial->WaitForLoaded())
{