[gnome-builder] xml-pack: fix the DTD not-validated error message
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] xml-pack: fix the DTD not-validated error message
- Date: Tue, 18 Jul 2017 22:43:09 +0000 (UTC)
commit 3c0db11dded3b889bffb09e2081b9df3c92f71f6
Author: Sebastien Lafargue <slafargue gnome org>
Date: Wed Jul 19 00:38:47 2017 +0200
xml-pack: fix the DTD not-validated error message
plugins/xml-pack/ide-xml-tree-builder.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-tree-builder.c b/plugins/xml-pack/ide-xml-tree-builder.c
index 99ea34d..5c12343 100644
--- a/plugins/xml-pack/ide-xml-tree-builder.c
+++ b/plugins/xml-pack/ide-xml-tree-builder.c
@@ -351,8 +351,14 @@ ide_xml_tree_builder_build_tree_cb2 (GObject *object,
if (!ide_xml_validator_validate (self->validator, doc, &diagnostics))
{
- uri = g_file_get_uri (entry->file);
- msg = g_strdup_printf ("Can't validate the schema: '%s'", uri);
+ if (entry->file == NULL)
+ msg = g_strdup_printf ("Can't validate the internal schema");
+ else
+ {
+ uri = g_file_get_uri (entry->file);
+ msg = g_strdup_printf ("Can't validate the schema: '%s'", uri);
+ }
+
diagnostic = create_diagnostic (context,
msg,
state->file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]