fix a core dump in unusual situations

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1261 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-10-04 07:52:27 +00:00
parent e14798188f
commit 1f60951ca5

View File

@ -811,7 +811,7 @@ char * xaccReadQIFTransaction (int fd, Account *acc)
/* at this point, we should see an end-of-transaction marker
* if we see something else, assume the worst, free the last
* transaction, and return */
if ('!' == qifline[0]) {
if (!qifline || ('!' == qifline[0])) {
xaccTransDestroy (trans);
xaccTransCommitEdit (trans);
return qifline;