Skip to content

gdkgltexture: Avoid use-after-free when switching GdkGLContext

Simon McVittie requested to merge wip/smcv/issue6995 into main

thread_current_context might be holding the last reference to previous, in which case gdk_gl_context_make_current on the new context will free previous, leaving it a dangling pointer. Avoid this by making sure to hold a reference.

Fixes: 41cd0c6f "gl: Fix initial EGL context creation on X11"
Resolves: #6995 (closed)

Merge request reports

Loading