aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 5f982e2c..992084af 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -115,7 +115,9 @@ static void gles2_texture_destroy(struct wlr_texture *wlr_texture) {
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
- wlr_egl_make_current(texture->egl, EGL_NO_SURFACE, NULL);
+ if (!wlr_egl_is_current(texture->egl)) {
+ wlr_egl_make_current(texture->egl, EGL_NO_SURFACE, NULL);
+ }
PUSH_GLES2_DEBUG;