diff --git a/Source/Engine/Level/Scene/Lightmap.cpp b/Source/Engine/Level/Scene/Lightmap.cpp index f2d11e0c5..c8b83febf 100644 --- a/Source/Engine/Level/Scene/Lightmap.cpp +++ b/Source/Engine/Level/Scene/Lightmap.cpp @@ -103,7 +103,7 @@ void Lightmap::EnsureSize(int32 size) #if COMPILE_WITH_ASSETS_IMPORTER Guid id = Guid::New(); - LOG(Info, "Cannot load lightmap {0} ({1}:{2}). Creating new one.", id, _index, textureIndex); + LOG(Info, "Cannot load lightmap ({1}:{2}). Creating new one with ID={0}.", id, _index, textureIndex); String assetPath; _manager->GetCachedLightmapPath(&assetPath, _index, textureIndex); diff --git a/Source/Engine/Level/Scene/Lightmap.h b/Source/Engine/Level/Scene/Lightmap.h index ef43428c7..3129dbd25 100644 --- a/Source/Engine/Level/Scene/Lightmap.h +++ b/Source/Engine/Level/Scene/Lightmap.h @@ -48,7 +48,7 @@ public: /// Gets attached texture objects /// /// Lightmaps textures array - void GetTextures(GPUTexture* lightmaps[]) const + void GetTextures(GPUTexture* lightmaps[3]) const { lightmaps[0] = _textures[0] ? _textures[0]->GetTexture() : nullptr; lightmaps[1] = _textures[1] ? _textures[1]->GetTexture() : nullptr; @@ -59,7 +59,7 @@ public: /// Gets attached texture objects /// /// Lightmaps textures array - void GetTextures(Texture* lightmaps[]) const + void GetTextures(Texture* lightmaps[3]) const { lightmaps[0] = _textures[0].Get(); lightmaps[1] = _textures[1].Get(); diff --git a/Source/Engine/ShadowsOfMordor/Builder.Charts.cpp b/Source/Engine/ShadowsOfMordor/Builder.Charts.cpp index ccd9f1d0e..f6ecfca00 100644 --- a/Source/Engine/ShadowsOfMordor/Builder.Charts.cpp +++ b/Source/Engine/ShadowsOfMordor/Builder.Charts.cpp @@ -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;