backend/native: Don't assume passed error points to anything
It's common practice to not require a non-NULL error passed to `GError **error` arguments, so do not make that assumption here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2699>
This commit is contained in:
parent
d6d6dc65c1
commit
b15be5e287
@ -699,12 +699,16 @@ init_gpus (MetaBackendNative *native,
|
||||
{
|
||||
MetaBackend *backend = META_BACKEND (native);
|
||||
MetaUdev *udev = meta_backend_native_get_udev (native);
|
||||
g_autoptr (GError) local_error = NULL;
|
||||
GList *devices;
|
||||
GList *l;
|
||||
|
||||
devices = meta_udev_list_drm_devices (udev, error);
|
||||
if (*error)
|
||||
return FALSE;
|
||||
devices = meta_udev_list_drm_devices (udev, &local_error);
|
||||
if (local_error)
|
||||
{
|
||||
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (l = devices; l; l = l->next)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user