Don't pass NULL to ferror() (from bug #143720).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13282 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2006-02-17 21:31:29 +00:00
parent 3fcedbca8e
commit 6aec7f5a94
2 changed files with 4 additions and 1 deletions

View File

@@ -33,6 +33,9 @@
so it's possible to run from it.
Also fix "fin.scm installed twice", bug #168629.
* src/import-export/log-replay/gnc-log-replay.c:
Don't pass NULL to ferror() (from bug #143720).
2006-02-15 Derek Atkins <derek@ihtfp.com>
* configure.in: get --disable-gui to actually do what we want.

View File

@@ -523,7 +523,7 @@ void gnc_file_log_replay (void)
DEBUG("Opening selected file");
log_file = fopen(selected_filename, "r");
if(ferror(log_file)!=0)
if(!log_file || ferror(log_file)!=0)
{
perror("File open failed");
}