Fix crash when switching from a level with lightmaps to one without
This commit is contained in:
parent
54b8dbc0b3
commit
d435c9c144
6 changed files with 18 additions and 6 deletions
|
|
@ -521,12 +521,9 @@ void VulkanRenderDevice::BeginFrame()
|
|||
{
|
||||
levelMeshChanged = false;
|
||||
mLevelMesh->SetLevelMesh(levelMesh);
|
||||
|
||||
if (levelMesh && levelMesh->Lightmap.TextureCount > 0)
|
||||
{
|
||||
if (levelMesh)
|
||||
GetTextureManager()->CreateLightmap(levelMesh->Lightmap.TextureSize, levelMesh->Lightmap.TextureCount, std::move(levelMesh->Lightmap.TextureData));
|
||||
GetLightmapper()->SetLevelMesh(levelMesh);
|
||||
}
|
||||
GetLightmapper()->SetLevelMesh(levelMesh);
|
||||
}
|
||||
|
||||
SetViewportRects(nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue