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 *