From 9cc5fc5dfd122aecb9f3fd1dfc946fd47f02472c Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Mon, 16 Jun 2003 05:31:29 +0000 Subject: [PATCH] * src/engine/Account.c: initialize the returned values in finder_help_function(). This fixes bug #108883 (and possibly others not reported). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8625 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 ++++ src/engine/Account.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b005d9b390..b4543afdc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -69,6 +69,10 @@ certain reports doesn't work right when the "reverse account balances" is set in certain ways. Fixes #107472. + * src/engine/Account.c: initialize the returned values in + finder_help_function(). This fixes bug #108883 (and possibly + others not reported). + 2003-06-14 Derek Atkins * src/backend/file/io-gncxml-v2.c: make the book-string an extern diff --git a/src/engine/Account.c b/src/engine/Account.c index a72ebb11f4..213dd6704c 100644 --- a/src/engine/Account.c +++ b/src/engine/Account.c @@ -3099,6 +3099,11 @@ finder_help_function(Account *account, { GList *slp; + /* First, make sure we set the data to NULL BEFORE we start */ + if (split) *split = NULL; + if (trans) *trans = NULL; + + /* Then see if we have any work to do */ if (account == NULL) return; /* Why is this loop iterated backwards ?? Presumably because the split @@ -3118,9 +3123,6 @@ finder_help_function(Account *account, return; } } - - if( split ) *split = NULL; - if( trans ) *trans = NULL; } Split *