[gnome-builder] prefs: fix warning when no git info is set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] prefs: fix warning when no git info is set
- Date: Thu, 5 May 2016 08:43:06 +0000 (UTC)
commit e8a717b36014630eb374d9861471c97b1d18ea7f
Author: Christian Hergert <chergert redhat com>
Date: Thu May 5 11:42:48 2016 +0300
prefs: fix warning when no git info is set
Passing NULL for text results in a warning, best to just default to ""
in that case to silence the warnings.
plugins/git/ide-git-preferences-addin.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/git/ide-git-preferences-addin.c b/plugins/git/ide-git-preferences-addin.c
index 528cff8..018fe90 100644
--- a/plugins/git/ide-git-preferences-addin.c
+++ b/plugins/git/ide-git-preferences-addin.c
@@ -120,7 +120,7 @@ register_git (IdePreferences *preferences)
author_text = read_config_string (config, "user.name", NULL);
author = g_object_new (IDE_TYPE_PREFERENCES_ENTRY,
- "text", author_text,
+ "text", author_text ?: "",
"title", "Author",
"visible", TRUE,
NULL);
@@ -132,7 +132,7 @@ register_git (IdePreferences *preferences)
email_text = read_config_string (config, "user.email", NULL);
email = g_object_new (IDE_TYPE_PREFERENCES_ENTRY,
- "text", email_text,
+ "text", email_text ?: "",
"title", "Email",
"visible", TRUE,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]