[at-spi2-core: 3/32] bus: Abort if we cannot get the default GSettingsSchemaSource




commit 26f75dc00eb16ccec89561aefe15f4036d45b4ec
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Dec 3 15:48:06 2021 -0600

    bus: Abort if we cannot get the default GSettingsSchemaSource
    
    This indicates an incorrect installation.
    
    If we proceed, there are critical warnings like
    
      (process:985): GLib-GIO-CRITICAL **: 20:10:12.875: g_settings_schema_source_lookup: assertion 'source 
!= NULL' failed
    
    and nothing works past that.

 bus/at-spi-bus-launcher.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index b0ccab67..13f7d3bb 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -851,6 +851,11 @@ get_schema (const gchar *name)
 {
 #if GLIB_CHECK_VERSION (2, 32, 0)
   GSettingsSchemaSource *source = g_settings_schema_source_get_default ();
+  if (!source)
+    {
+      g_error ("Cannot get the default GSettingsSchemaSource - is the gsettings-desktop-schemas package 
installed?");
+    }
+
   GSettingsSchema *schema = g_settings_schema_source_lookup (source, name, FALSE);
 
   if (schema == NULL)


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