1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-17 15:15:27 +01:00

Introduce EMT_INVALID as safe placeholder

This commit is contained in:
sfan5
2025-11-07 13:30:26 +01:00
parent fad3a0fa6d
commit c3790dd7af
8 changed files with 16 additions and 23 deletions

View File

@@ -1700,6 +1700,8 @@ void COpenGLDriver::setRenderStates3DMode()
if (static_cast<u32>(Material.MaterialType) < MaterialRenderers.size())
MaterialRenderers[Material.MaterialType].Renderer->OnSetMaterial(
Material, LastMaterial, ResetRenderStates, this);
else
os::Printer::log("Attempt to render with invalid material", ELL_WARNING);
LastMaterial = Material;
CacheHandler->correctCacheMaterial(LastMaterial);