[tracker/tracker-0.12] ttl2sgml: Do not call fclose if file is NULL



commit 5dfd0c284c647ee5ffe61d917ab291513a2a2005
Author: JÃrg Billeter <j bitron ch>
Date:   Thu Jan 26 16:03:26 2012 +0100

    ttl2sgml: Do not call fclose if file is NULL

 docs/tools/ttl2sgml.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/docs/tools/ttl2sgml.c b/docs/tools/ttl2sgml.c
index 898d75c..8cc9302 100644
--- a/docs/tools/ttl2sgml.c
+++ b/docs/tools/ttl2sgml.c
@@ -116,7 +116,10 @@ main (gint argc, gchar **argv)
 	g_option_context_free (context);
 
 	fclose (f);
-	fclose (fts);
+
+	if (fts) {
+		fclose (fts);
+	}
 
 	return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]