mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 754533 No Account Templates Error Patch
Add test for zero account list to stop warnings.
This commit is contained in:
parent
42415056d0
commit
557ec68667
@ -208,7 +208,10 @@ gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
|
||||
|
||||
tRoot = gnc_book_get_template_root( gnc_get_current_book() );
|
||||
al = gnc_account_get_descendants( tRoot );
|
||||
xaccQueryAddAccountMatch( start_q, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
if (g_list_length(al) != 0)
|
||||
xaccQueryAddAccountMatch( start_q, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
g_list_free (al);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
|
@ -209,7 +209,10 @@ gnc_ui_find_transactions_dialog_create2 (GNCLedgerDisplay2 * orig_ledg)
|
||||
|
||||
tRoot = gnc_book_get_template_root( gnc_get_current_book() );
|
||||
al = gnc_account_get_descendants( tRoot );
|
||||
xaccQueryAddAccountMatch( start_q, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
if (g_list_length(al) != 0)
|
||||
xaccQueryAddAccountMatch( start_q, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
g_list_free (al);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
|
@ -415,7 +415,10 @@ gnc_ledger_display_gl (void)
|
||||
|
||||
tRoot = gnc_book_get_template_root( gnc_get_current_book() );
|
||||
al = gnc_account_get_descendants( tRoot );
|
||||
xaccQueryAddAccountMatch( query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
if (g_list_length(al) != 0)
|
||||
xaccQueryAddAccountMatch( query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
g_list_free (al);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
|
@ -424,7 +424,10 @@ gnc_ledger_display2_gl (void)
|
||||
|
||||
tRoot = gnc_book_get_template_root( gnc_get_current_book() );
|
||||
al = gnc_account_get_descendants( tRoot );
|
||||
xaccQueryAddAccountMatch( query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
if (g_list_length(al) != 0)
|
||||
xaccQueryAddAccountMatch( query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
|
||||
|
||||
g_list_free (al);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user