[gnome-builder] config-manager: add fallback for empty string
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] config-manager: add fallback for empty string
- Date: Fri, 6 May 2016 15:59:09 +0000 (UTC)
commit 61384ad03de969aae86a704c9511fefe3fc08ea7
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]