mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
xlib: clear currentDpy when releasing the current context
Afterabe6d750e5, glXDestroyContext() can defer destruction by marking the context with xid == None while it is still current. However, the release-current path did not clear current->currentDpy, so a context that had already been marked for deletion could remain associated with a display after unbinding. Fixes:abe6d750e5("xlib: fix glXDestroyContext in Gallium frontends") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14947 Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit447a1d2e8d) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
This commit is contained in:
parent
871a933cac
commit
c72a0457e1
2 changed files with 3 additions and 1 deletions
|
|
@ -3454,7 +3454,7 @@
|
|||
"description": "xlib: clear currentDpy when releasing the current context",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "abe6d750e58d371624de75f4bad365c61e0196c1",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1236,6 +1236,8 @@ glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
|
|||
}
|
||||
else if (!ctx && !draw && !read) {
|
||||
/* release current context w/out assigning new one. */
|
||||
if (current)
|
||||
current->currentDpy = NULL;
|
||||
XMesaMakeCurrent2( NULL, NULL, NULL );
|
||||
SetCurrentContext(NULL);
|
||||
return True;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue