[gnome-builder] beautifier plugin: config file release fix



commit ce5395b94796ea04380392642e2993c43466c85b
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Fri Aug 11 00:09:20 2017 +0200

    beautifier plugin: config file release fix
    
    Some entries don't have a config file,
    so check this before releasing the file object.

 plugins/beautifier/gb-beautifier-config.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-config.c b/plugins/beautifier/gb-beautifier-config.c
index 1ea446b..2852142 100644
--- a/plugins/beautifier/gb-beautifier-config.c
+++ b/plugins/beautifier/gb-beautifier-config.c
@@ -46,7 +46,10 @@ config_entry_clear_func (gpointer data)
 
   g_assert (entry != NULL);
 
-  g_object_unref (entry->config_file);
+  /* Some entries don't have a config file */
+  if (entry->config_file != NULL)
+    g_object_unref (entry->config_file);
+
   g_free (entry->name);
   g_free (entry->lang_id);
 


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