mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-19 19:25:18 +02:00
Improve robustness of GL object handling
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user