wgl: Release the context before deleting it in wglDeleteContext
authorCaleb Cornett <caleb.cornett@outlook.com>
Thu, 4 Aug 2022 22:33:18 +0000 (18:33 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 8 Aug 2022 19:33:38 +0000 (19:33 +0000)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17848>

src/gallium/targets/libgl-gdi/stw_wgl.c

index 3b56fb5..619acb9 100644 (file)
@@ -80,6 +80,7 @@ WINGDIAPI BOOL APIENTRY
 wglDeleteContext(
    HGLRC hglrc )
 {
+   DrvReleaseContext((DHGLRC)(UINT_PTR)hglrc);
    return DrvDeleteContext((DHGLRC)(UINT_PTR)hglrc );
 }