[gnome-builder] gettext: ensure lang_id is initialized
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gettext: ensure lang_id is initialized
- Date: Sun, 14 Jan 2018 09:51:58 +0000 (UTC)
commit c8fae4b5f4e0c8b9c4cdf1ccfb691800a2caa229
Author: Christian Hergert <chergert redhat com>
Date: Sun Jan 14 01:51:38 2018 -0800
gettext: ensure lang_id is initialized
And don't pass NULL to the string formatter.
src/plugins/gettext/ide-gettext-diagnostic-provider.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gettext/ide-gettext-diagnostic-provider.c
b/src/plugins/gettext/ide-gettext-diagnostic-provider.c
index ff4f5968d..6fa75db20 100644
--- a/src/plugins/gettext/ide-gettext-diagnostic-provider.c
+++ b/src/plugins/gettext/ide-gettext-diagnostic-provider.c
@@ -155,7 +155,7 @@ ide_gettext_diagnostic_provider_diagnose_async (IdeDiagnosticProvider *provider,
g_autoptr(GTask) task = NULL;
g_autoptr(GError) error = NULL;
GtkSourceLanguage *language;
- const gchar *lang_id;
+ const gchar *lang_id = NULL;
const gchar *xgettext_id;
g_assert (IDE_IS_GETTEXT_DIAGNOSTIC_PROVIDER (self));
@@ -177,7 +177,7 @@ ide_gettext_diagnostic_provider_diagnose_async (IdeDiagnosticProvider *provider,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"Language %s is not supported",
- lang_id);
+ lang_id ?: "plain-text");
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]