[mutter] backend/native: Gracefully handle failing to create monitor manager



commit 35ecc6ba7cbccd547cc2843b21aea22372a93324
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon Jan 18 22:35:35 2021 +0100

    backend/native: Gracefully handle failing to create monitor manager
    
    We tried to start listening to a signal even if it didn't construct
    properly. Stop doing that.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>

 src/backends/native/meta-backend-native.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index 2807d88628..cd9275ca08 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -204,6 +204,9 @@ meta_backend_native_create_monitor_manager (MetaBackend *backend,
   manager = g_initable_new (META_TYPE_MONITOR_MANAGER_KMS, NULL, error,
                             "backend", backend,
                             NULL);
+  if (!manager)
+    return NULL;
+
   g_signal_connect_swapped (manager, "monitors-changed-internal",
                             G_CALLBACK (update_viewports), backend);
 


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