Don't segfault when in --one-file mode
The problem is that on Linux, fclose() of a NULL pointer segfaults Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
799956e9b7
commit
1d09e39d45
@@ -284,11 +284,15 @@ close_generate (void)
|
||||
{
|
||||
fprintf (headerfile, "#endif /* __%s_h__ */\n", headerbase);
|
||||
|
||||
fclose (headerfile);
|
||||
fclose (privheaderfile);
|
||||
fclose (templatefile);
|
||||
fprintf (logfile, "\n");
|
||||
fclose (logfile);
|
||||
if (headerfile)
|
||||
fclose (headerfile);
|
||||
if (privheaderfile)
|
||||
fclose (privheaderfile);
|
||||
if (templatefile)
|
||||
fclose (templatefile);
|
||||
if (logfile)
|
||||
fprintf (logfile, "\n");
|
||||
fclose (logfile);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user