diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index c31a5e160..815c029ef 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -240,11 +240,13 @@ AbstractTexture::~AbstractTexture() { if(binding.second == _id) binding = {}; } + #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /* Remove all image bindings */ for(auto& binding: Context::current().state().texture->imageBindings) { /* MSVC 2015 needs the parentheses around */ if(std::get<0>(binding) == _id) binding = {}; } + #endif glDeleteTextures(1, &_id); }