mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 00:50:07 +01:00
On Wayland, if the wl_drm interface is not available, for example if the compositor is using the proprietary NVIDIA driver along with their egl-wayland library, the device_select layer will fail to initialize. However, the failure path will unconditionally call wl_drm_destroy even though info.wl_drm would be NULL in that case. This can cause a segfault in libwayland-client.so. To fix this, check if info.wl_drm is NULL before calling wl_drm_destroy. This way, initialization will fail gracefully even if that interface is not present. Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10598> |
||
|---|---|---|
| .. | ||
| device_select.h | ||
| device_select_layer.c | ||
| device_select_wayland.c | ||
| device_select_x11.c | ||
| meson.build | ||
| VkLayer_MESA_device_select.json | ||