diff --git a/c/helper.c b/c/helper.c
--- a/c/helper.c
+++ b/c/helper.c
@@ -137,5 +137,6 @@
 
 int fclose_helper(FILE *file, yaml_parser_t *parser)
 {
+	if (! file) return 0;
 	return fclose(file);
 }
diff --git a/yaml.cabal b/yaml.cabal
--- a/yaml.cabal
+++ b/yaml.cabal
@@ -1,5 +1,5 @@
 name:            yaml
-version:         0.4.1.1
+version:         0.4.1.2
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov 
@@ -7,7 +7,7 @@
 synopsis:        Low-level binding to the libyaml C library.
 description:     Provides support for parsing and emitting Yaml documents.
                  .
-                 This package includes the full libyaml C library version 0.1.12 by Kirill
+                 This package includes the full libyaml C library version 0.1.2 by Kirill
                  Simonov (<http://pyyaml.org/wiki/LibYAML>) in the package so you
                  don't need to worry about any non-Haskell dependencies.
 category:        Web
