From d996319cf96d06d37b7860855f0d5756c2bc4777 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 9 Jul 2021 16:26:11 +0800 Subject: [PATCH] kms: Add a missing g_set_error on error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So the GError is not left NULL and then dereferenced. Fix provided by Jonas Ã…dahl Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1878 Part-of: --- src/backends/native/meta-kms-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-kms-device.c b/src/backends/native/meta-kms-device.c index f2ca52f47..b4d3e5802 100644 --- a/src/backends/native/meta-kms-device.c +++ b/src/backends/native/meta-kms-device.c @@ -312,6 +312,9 @@ meta_create_kms_impl_device (MetaKmsDevice *device, } } + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "No suitable mode setting backend found"); + return NULL; } }