From 6a4ec30af49bcbf61cf8ebc3a8f5541abac9024d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 2 Nov 2025 11:23:37 -0800 Subject: [PATCH] glamor: avoid null dereference in glamor_composite_clipped_region() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported in #1817: xwayland-24.1.6/redhat-linux-build/../glamor/glamor_render.c:1577:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ Signed-off-by: Alan Coopersmith Part-of: --- glamor/glamor_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 1bcf01102..1208b49a7 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -1573,7 +1573,7 @@ glamor_composite_clipped_region(CARD8 op, if (source && ((!source->pDrawable && (source->pSourcePict->type != SourcePictTypeSolidFill)) - || (source->pDrawable + || (source->pDrawable && source_pixmap && !GLAMOR_PIXMAP_PRIV_HAS_FBO(source_pixmap_priv) && (source_pixmap->drawable.width != width || source_pixmap->drawable.height != height)))) {