avoid trying to fwrite to an unopened file
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 15 Jan 2011 19:53:11 +0000 (19:53 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 15 Jan 2011 19:53:11 +0000 (19:53 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@56140 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_decc.c

index 31036ed..5735afc 100644 (file)
@@ -319,7 +319,10 @@ output(void)
                       exit (-1);
                    }
                  if (!(f = fopen(out, "wb")))
-                    ERR("Could not open file: %s", out);
+                    {
+                       ERR("Could not open file: %s", out);
+                      exit (-1);
+                    }
                  if (fwrite(font, fontsize, 1, f) != 1)
                    ERR("Could not write font: %s", strerror(errno));
                  if (f) fclose(f);