[tracker/wip/sam/meson: 10/13] Avoid crash in ttlresource2sgml.c on invalid output path
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/sam/meson: 10/13] Avoid crash in ttlresource2sgml.c on invalid output path
- Date: Mon, 27 Feb 2017 00:09:01 +0000 (UTC)
commit c9e21623c5ae2455f8d28e5270366a3afece4cfe
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Feb 26 22:42:00 2017 +0000
Avoid crash in ttlresource2sgml.c on invalid output path
docs/tools/ttlresource2sgml.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/docs/tools/ttlresource2sgml.c b/docs/tools/ttlresource2sgml.c
index ae91882..9a24b57 100644
--- a/docs/tools/ttlresource2sgml.c
+++ b/docs/tools/ttlresource2sgml.c
@@ -781,6 +781,11 @@ generate_ontology_class_docs (Ontology *ontology,
output_file = g_build_filename (output_dir, class_filename, NULL);
f = fopen (output_file, "w");
+
+ if (f == NULL) {
+ g_error ("Could not open %s for writing.\n", output_file);
+ }
+
g_free (class_filename);
g_free (output_file);
g_free (shortname);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]