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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user