oops, carefule with those splits!

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@510 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-02-05 09:14:25 +00:00
parent c18bd0b3db
commit 590677d3d0

View File

@ -488,9 +488,11 @@ xaccTransSetMemo (Transaction *trans, const char *memo)
/* if there is only one split, then keep memos in sync. */
if (trans->debit_splits) {
if (0x0 == trans->debit_splits[1]) {
free (trans->debit_splits[0]->memo);
trans->debit_splits[0]->memo = strdup (memo);
if (0x0 != trans->debit_splits[0]) {
if (0x0 == trans->debit_splits[1]) {
free (trans->debit_splits[0]->memo);
trans->debit_splits[0]->memo = strdup (memo);
}
}
}
}
@ -503,9 +505,11 @@ xaccTransSetAction (Transaction *trans, const char *actn)
/* if there is only one split, then keep action in sync. */
if (trans->debit_splits) {
if (0x0 == trans->debit_splits[1]) {
free (trans->debit_splits[0]->action);
trans->debit_splits[0]->action = strdup (actn);
if (0x0 != trans->debit_splits[0]) {
if (0x0 == trans->debit_splits[1]) {
free (trans->debit_splits[0]->action);
trans->debit_splits[0]->action = strdup (actn);
}
}
}
}