device-select: Fix error check.

Fixes: 355b96413d ("egl/wayland: Move bind_wayland_display to legacy build option")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13931
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37622>
This commit is contained in:
Bas Nieuwenhuizen 2025-09-29 16:49:22 +02:00
parent 5e5bc7a1c7
commit 00b8b571c6

View file

@ -208,7 +208,7 @@ device_select_find_wayland_pci_default(struct device_pci_info *devices, uint32_t
wl_display_dispatch(display);
wl_display_roundtrip(display);
drmDevicePtr target;
drmDevicePtr target = NULL;
if (info.dmabuf_dev_info != NULL) {
target = info.dmabuf_dev_info;
}
@ -217,7 +217,7 @@ device_select_find_wayland_pci_default(struct device_pci_info *devices, uint32_t
target = info.drm_dev_info;
}
#endif
if (target != NULL) {
if (target == NULL) {
goto done;
}