mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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>
(cherry picked from commit c6522229b8)
This commit is contained in:
@@ -149,7 +149,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc)
|
||||
dash_pixmap = glamor_get_dash_pixmap(gc);
|
||||
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;
|
||||
|
||||
glamor_make_current(glamor_priv);
|
||||
|
||||
Reference in New Issue
Block a user