1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Improve robustness of GL object handling

This commit is contained in:
sfan5 2025-03-12 19:46:12 +01:00
parent 077828d0d9
commit 4b85062caf
4 changed files with 23 additions and 2 deletions

View file

@ -100,7 +100,9 @@ class COpenGLCoreCacheHandler
GL.Enable(curTextureType);
#endif
GL.BindTexture(curTextureType, static_cast<const TOpenGLTexture *>(texture)->getOpenGLTextureName());
auto name = static_cast<const TOpenGLTexture *>(texture)->getOpenGLTextureName();
_IRR_DEBUG_BREAK_IF(name == 0)
GL.BindTexture(curTextureType, name);
} else {
texture = 0;