[mutter] kms: Add a missing g_set_error on error



commit d996319cf96d06d37b7860855f0d5756c2bc4777
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Fri Jul 9 16:26:11 2021 +0800

    kms: Add a missing g_set_error on error
    
    So the GError is not left NULL and then dereferenced.
    
    Fix provided by Jonas Ã…dahl <jadahl gmail com>
    
    Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1878
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1925>

 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 f2ca52f47a..b4d3e58024 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;
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]