Fix warning on Asset::WaitForLoaded` when loading failed before

This commit is contained in:
Wojtek Figat
2023-03-03 17:43:55 +01:00
parent d5df227df5
commit 987e680908

View File

@@ -400,6 +400,11 @@ bool Asset::WaitForLoaded(double timeoutInMilliseconds) const
return false;
}
// Check if loading failed
Platform::MemoryBarrier();
if (LastLoadFailed())
return true;
// Check if has missing loading task
Platform::MemoryBarrier();
const auto loadingTask = _loadingTask;