mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
vulkan/wsi/x11: add null pointer check for the has_dri3_v1_2 test
This fixes a crash (ver_reply is NULL) when DISPLAY points to a remote display. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6040 Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15469>
This commit is contained in:
parent
948ad5ac23
commit
03d342e4b2
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
|
|||
|
||||
ver_cookie = xcb_dri3_query_version(conn, 1, 2);
|
||||
ver_reply = xcb_dri3_query_version_reply(conn, ver_cookie, NULL);
|
||||
has_dri3_v1_2 =
|
||||
has_dri3_v1_2 = ver_reply != NULL &&
|
||||
(ver_reply->major_version > 1 || ver_reply->minor_version >= 2);
|
||||
free(ver_reply);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue