From ffab4c8cb7bc7362cd3318f39162a98629bd4d19 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 22 Sep 2022 17:43:08 +0800 Subject: [PATCH] glx: Guard usage of infer_zink && !explicit_zink in glxext.c Fixes: 2569215f43f ("egl/glx: add fallback for zink loading") Signed-off-by: Yonggang Luo Reviewed-by: Adam Jackson Part-of: --- src/glx/glxext.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 5e955fc..927d065 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -974,6 +974,7 @@ __glXInitialize(Display * dpy) #endif if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) Bool fail = true; /* if zink was inferred, retry without zink */ if (infer_zink && !explicit_zink) { @@ -985,6 +986,10 @@ __glXInitialize(Display * dpy) free(dpyPriv); return NULL; } +#else + free(dpyPriv); + return NULL; +#endif } __glX_send_client_info(dpyPriv); -- 2.7.4