mirror of
https://github.com/brl/mutter.git
synced 2025-03-27 21:53:47 +00:00
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);
|
MetaBackend *backend = META_BACKEND (native);
|
||||||
MetaUdev *udev = meta_backend_native_get_udev (native);
|
MetaUdev *udev = meta_backend_native_get_udev (native);
|
||||||
|
g_autoptr (GError) local_error = NULL;
|
||||||
GList *devices;
|
GList *devices;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
devices = meta_udev_list_drm_devices (udev, error);
|
devices = meta_udev_list_drm_devices (udev, &local_error);
|
||||||
if (*error)
|
if (local_error)
|
||||||
return FALSE;
|
{
|
||||||
|
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
for (l = devices; l; l = l->next)
|
for (l = devices; l; l = l->next)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user