Fix crash if texture is missing

#942
This commit is contained in:
Wojtek Figat
2023-02-17 16:19:10 +01:00
parent aa1a0ea4a2
commit 5dc63da4bf
3 changed files with 4 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ void ShadowsOfMordor::Builder::updateLightmaps()
{
auto texture = textures[textureIndex];
GPUDevice::Instance->Locker.Unlock();
if (texture->WaitForLoaded())
if (!texture || texture->WaitForLoaded())
{
LOG(Error, "Lightmap load failed.");
return;