mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fix core dump
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@173 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6f2d330f1c
commit
b00cabb88a
@ -587,8 +587,13 @@ xaccRecomputeBalance( Account * acc )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( (STOCK == acc->type) || ( MUTUAL == acc->type) ) {
|
if ( (STOCK == acc->type) || ( MUTUAL == acc->type) ) {
|
||||||
acc -> balance = share_balance * (last_trans->share_price);
|
if (last_trans) {
|
||||||
acc -> cleared_balance = share_cleared_balance * (last_trans->share_price);
|
acc -> balance = share_balance * (last_trans->share_price);
|
||||||
|
acc -> cleared_balance = share_cleared_balance * (last_trans->share_price);
|
||||||
|
} else {
|
||||||
|
acc -> balance = 0.0;
|
||||||
|
acc -> cleared_balance = 0.0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
acc -> balance = dbalance;
|
acc -> balance = dbalance;
|
||||||
acc -> cleared_balance = dcleared_balance;
|
acc -> cleared_balance = dcleared_balance;
|
||||||
|
Loading…
Reference in New Issue
Block a user