Fix opening material or particle emitter in editor if shader compilation fails
This commit is contained in:
@@ -481,7 +481,7 @@ void Material::InitCompilationOptions(ShaderCompilationOptions& options)
|
||||
BytesContainer Material::LoadSurface(bool createDefaultIfMissing)
|
||||
{
|
||||
BytesContainer result;
|
||||
if (WaitForLoaded())
|
||||
if (WaitForLoaded() && !LastLoadFailed())
|
||||
return result;
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ void ParticleEmitter::InitCompilationOptions(ShaderCompilationOptions& options)
|
||||
BytesContainer ParticleEmitter::LoadSurface(bool createDefaultIfMissing)
|
||||
{
|
||||
BytesContainer result;
|
||||
if (WaitForLoaded())
|
||||
if (WaitForLoaded() && !LastLoadFailed())
|
||||
return result;
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user