From 464daf978e1a8c35e9a6bbc8e5b9d1996d0c013f Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Thu, 19 Mar 2026 15:26:39 +0000 Subject: [PATCH] glx/windows: Fix compilation of driwindows_glx after driscreen changed from pointer to member MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context’: > ../src/glx/driwindows_glx.c:122:8: error: wrong type argument to unary exclamation mark > 122 | if (!psc->base.driScreen) > | ^ > ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context_attribs’: > ../src/glx/driwindows_glx.c:196:8: error: wrong type argument to unary exclamation mark > 196 | if (!psc->base.driScreen || !config_base) > | ^ Since the driScreen member of driwindows_screen is now a struct, not a pointer, checking it for non-NULL-ness like this is an error. Fixes: 1ce9aa3d6526 ("mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere") Signed-off-by: Jon Turney Part-of: --- src/glx/driwindows_glx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/glx/driwindows_glx.c b/src/glx/driwindows_glx.c index 2cc03f36d91..5264f0b38d2 100644 --- a/src/glx/driwindows_glx.c +++ b/src/glx/driwindows_glx.c @@ -119,9 +119,6 @@ driwindows_create_context(struct glx_screen *base, struct driwindows_screen *psc = (struct driwindows_screen *) base; windowsContext *shared = NULL; - if (!psc->base.driScreen) - return NULL; - /* Check the renderType value */ if (!validate_renderType_against_config(config_base, renderType)) return NULL; @@ -193,7 +190,7 @@ driwindows_create_context_attribs(struct glx_screen *base, identical values, so far */ - if (!psc->base.driScreen || !config_base) + if (!config_base) return NULL; /* Check the renderType value */