mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add a side effect (yuck) why am i doing this?
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@740 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
44f8e711b2
commit
2b20f9100d
@ -396,7 +396,6 @@ xaccInsertSubAccount( Account *adult, Account *child )
|
||||
int retval;
|
||||
|
||||
if (NULL == adult) return -1;
|
||||
if (NULL == child) return -1;
|
||||
|
||||
/* if a container for the children doesn't yet exist, add it */
|
||||
if (NULL == adult->children) {
|
||||
@ -406,6 +405,9 @@ xaccInsertSubAccount( Account *adult, Account *child )
|
||||
/* set back-pointer to parent */
|
||||
adult->children->parent = adult;
|
||||
|
||||
/* allow side-effect of creating a child-less account group */
|
||||
if (NULL == child) return -1;
|
||||
|
||||
retval = insertAccount (adult->children, child);
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user