1
0
Fork 0

native: Return an error if no drm devices are found

Without this, we'll end up segfaulting when trying to log the
non-existing error.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1217
This commit is contained in:
Jonas Ådahl 2020-04-24 15:15:53 +02:00 committed by Georges Basile Stavracas Neto
parent 106d332c71
commit 0fbda366e8

View file

@ -148,6 +148,13 @@ meta_udev_list_drm_devices (MetaUdev *udev,
l = l_next;
}
if (!devices)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"No DRM devices found");
return NULL;
}
return devices;
}