fix a stupid assert

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@821 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-04-19 05:19:42 +00:00
parent b999c291ed
commit 17443baae0
2 changed files with 9 additions and 1 deletions

View File

@ -751,6 +751,7 @@ readTransaction( int fd, Account *acc, int token )
}
}
}
xaccTransCommitEdit (trans);
return trans;
}

View File

@ -415,7 +415,14 @@ xaccSplitRebalance (Split *split)
double value = 0.0;
trans = split->parent;
assert (trans);
/* We might have gotten here if someone is manipulating
* a split that has not yet been inserted in a transaction.
* Rather than punishing them with an assert, lets just
* quietly return.
*/
if (!trans) return;
assert (trans->splits);
assert (trans->splits[0]);