[PATCH] winex11: Check for invalid format in get_tile_pict

Alex Henrie alexhenrie24 at gmail.com
Wed Mar 30 00:17:43 CDT 2022


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52747
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/winex11.drv/xrender.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 5ede97fb026..1cb7e67a477 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1230,6 +1230,8 @@ static Picture get_tile_pict( enum wxr_format wxr_format, const XRenderColor *co
         XRenderColor current_color;
     } tiles[WXR_NB_FORMATS], *tile;
 
+    if (wxr_format == WXR_INVALID_FORMAT) return 0;
+
     tile = &tiles[wxr_format];
 
     if(!tile->xpm)
-- 
2.35.1




More information about the wine-devel mailing list