[gnome-builder/gnome-builder-3-20] config-manager: add fallback for empty string



commit 179b51f536ae4fdfa4f16bdc7571a956a9105125
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 6 18:58:59 2016 +0300

    config-manager: add fallback for empty string
    
    GKeyFile does not like getting NULL string values.

 libide/ide-configuration-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-configuration-manager.c b/libide/ide-configuration-manager.c
index 5697dba..f235d18 100644
--- a/libide/ide-configuration-manager.c
+++ b/libide/ide-configuration-manager.c
@@ -292,7 +292,7 @@ ide_configuration_manager_save_async (IdeConfigurationManager *self,
 
 #define PERSIST_STRING_KEY(key, getter) \
       g_key_file_set_string (self->key_file, group, key, \
-                             ide_configuration_##getter (configuration))
+                             ide_configuration_##getter (configuration) ?: "")
       PERSIST_STRING_KEY ("name", get_display_name);
       PERSIST_STRING_KEY ("device", get_device_id);
       PERSIST_STRING_KEY ("runtime", get_runtime_id);


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