fix: Only try to delete textures if OpenGL is still available

This commit is contained in:
WerWolv
2025-02-25 21:51:18 +01:00
parent 2653740a36
commit f3a9ca6d6f

View File

@@ -288,6 +288,9 @@ namespace ImGuiExt {
}
void Texture::reset() {
if (glDeleteTextures == nullptr)
return;
if (m_textureId != 0) {
glDeleteTextures(1, reinterpret_cast<GLuint*>(&m_textureId));
m_textureId = 0;