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:
parent
106d332c71
commit
0fbda366e8
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue