Fix error when loading surface from not yet loaded asset

This commit is contained in:
Wojtek Figat
2022-05-06 18:30:49 +02:00
parent 4cedd0f30c
commit 78d6fe6b50
9 changed files with 25 additions and 6 deletions

View File

@@ -335,6 +335,8 @@ void ParticleEmitter::InitCompilationOptions(ShaderCompilationOptions& options)
BytesContainer ParticleEmitter::LoadSurface(bool createDefaultIfMissing)
{
BytesContainer result;
if (WaitForLoaded())
return result;
ScopeLock lock(Locker);
// Check if has that chunk