glamor: avoid null dereference in glamor_dash_setup()

Reported in #1817:

xwayland-24.1.6/redhat-linux-build/../glamor/glamor_dash.c:152:10:
 warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094>
This commit is contained in:
Alan Coopersmith 2025-10-28 18:16:00 -07:00
parent 84cf20e6dd
commit c6522229b8

View file

@ -149,7 +149,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc)
dash_pixmap = glamor_get_dash_pixmap(gc); dash_pixmap = glamor_get_dash_pixmap(gc);
dash_priv = glamor_get_pixmap_private(dash_pixmap); dash_priv = glamor_get_pixmap_private(dash_pixmap);
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv)) if (!dash_priv || !GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
goto bail; goto bail;
glamor_make_current(glamor_priv); glamor_make_current(glamor_priv);