summaryrefslogtreecommitdiff
path: root/walk.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-27 18:08:48 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-27 18:08:48 -0400
commitba2c04072c2f6b1fc50dc8ff3a41098ea6e634e6 (patch)
treef32580aa14d2628f3fc27e663f8778c30632ca34 /walk.h
parenteb6861e192281b612e115c8b3bf240e574bca835 (diff)
downloadfork-ledger-ba2c04072c2f6b1fc50dc8ff3a41098ea6e634e6.tar.gz
fork-ledger-ba2c04072c2f6b1fc50dc8ff3a41098ea6e634e6.tar.bz2
fork-ledger-ba2c04072c2f6b1fc50dc8ff3a41098ea6e634e6.zip
fixed several segfaults (using new option-scrambler test harness)
Diffstat (limited to 'walk.h')
-rw-r--r--walk.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/walk.h b/walk.h
index 39a220be..0ac9e133 100644
--- a/walk.h
+++ b/walk.h
@@ -306,8 +306,10 @@ class changed_value_transactions : public item_handler<transaction_t>
changed_values_only(_changed_values_only), last_xact(NULL) {}
virtual void flush() {
- output_diff(std::time(NULL));
- last_xact = NULL;
+ if (last_xact) {
+ output_diff(std::time(NULL));
+ last_xact = NULL;
+ }
item_handler<transaction_t>::flush();
}