From 1f4945e1ff8d805baeca4e5956a84f8fc9b62cf4 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Fri, 6 Jun 2014 20:16:24 +0200 Subject: [PATCH] filebrowser: Fix g_settings_schema_source_lookup usage --- plugins/filebrowser/pluma-file-browser-plugin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c index 030ab78..11b7718 100644 --- a/plugins/filebrowser/pluma-file-browser-plugin.c +++ b/plugins/filebrowser/pluma-file-browser-plugin.c @@ -624,6 +624,7 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window) PlumaFileBrowserStore * store; gchar *data_dir; GSettingsSchemaSource *schema_source; + GSettingsSchema *schema; data = g_new0 (PlumaFileBrowserPluginData, 1); @@ -690,9 +691,11 @@ impl_activate (PlumaPlugin * plugin, PlumaWindow * window) /* Install caja preferences */ schema_source = g_settings_schema_source_get_default(); - if (g_settings_schema_source_lookup (schema_source, CAJA_SCHEMA, FALSE)) { + schema = g_settings_schema_source_lookup (schema_source, CAJA_SCHEMA, FALSE); + if (schema != NULL) { data->caja_settings = g_settings_new (CAJA_SCHEMA); install_caja_prefs (data); + g_settings_schema_unref (schema); } /* Connect signals to store the last visited location */