From e5a8bbf997f14ea2edf52d6dfe733969cc67589b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 26 Jul 2008 23:55:17 -0400 Subject: Another quick optimization that cuts down on memory allocation. --- walk.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'walk.h') diff --git a/walk.h b/walk.h index 3eedbae9..bd6bc2c2 100644 --- a/walk.h +++ b/walk.h @@ -145,9 +145,11 @@ transaction_xdata_t& transaction_xdata(const transaction_t& xact); void add_transaction_to(const transaction_t& xact, value_t& value); inline account_t * xact_account(transaction_t& xact) { - account_t * account = transaction_xdata(xact).account; - if (account) - return account; + if (xact.data) { + account_t * account = transaction_xdata(xact).account; + if (account) + return account; + } return xact.account; } -- cgit v1.2.3