From 470e6672b17e7d8b5527c291aaee4d8fb442728f Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Thu, 17 Jun 2010 15:37:14 +0100 Subject: gstdoc-scangobj: abort with an error if we couldn't open a file for writing --- gstdoc-scangobj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gstdoc-scangobj b/gstdoc-scangobj index 9cd5018..637bacb 100755 --- a/gstdoc-scangobj +++ b/gstdoc-scangobj @@ -208,6 +208,10 @@ get_object_types (void) inspect_name = g_strdup_printf ("$INSPECT_DIR" G_DIR_SEPARATOR_S "plugin-%s.xml", plugin->desc.name); inspect = fopen (inspect_name, "w"); + if (inspect == NULL) { + g_error ("Could not open %s for writing: %s\\n", inspect_name, + g_strerror (errno)); + } g_free (inspect_name); /* output plugin data */ -- cgit v1.2.3