summaryrefslogtreecommitdiff
path: root/gnucash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnucash.cc')
-rw-r--r--gnucash.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnucash.cc b/gnucash.cc
index b29ea674..6b432a78 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -203,10 +203,13 @@ static void dataHandler(void *userData, const char *s, int len)
delete curr_value;
curr_value = NULL;
}
+
xact->cost = create_amount(value.c_str(), curr_value);
- if (curr_value)
+ if (curr_value) {
delete curr_value;
+ curr_value = NULL;
+ }
if (do_compute)
xact->acct->balance.credit(xact->cost);