mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798435 - Crash on print after printing checks
bug in 0a22f688a
- splits gets a pointer to the QofQuery output and
must not be freed
This commit is contained in:
parent
22a1c354f7
commit
3c0dfb2741
@ -3744,7 +3744,10 @@ gnc_plugin_page_register_cmd_print_check (GtkAction* action,
|
|||||||
else if (ledger_type == LD_GL && reg->type == SEARCH_LEDGER)
|
else if (ledger_type == LD_GL && reg->type == SEARCH_LEDGER)
|
||||||
{
|
{
|
||||||
Account* common_acct = NULL;
|
Account* common_acct = NULL;
|
||||||
|
|
||||||
|
/* the following GList* splits must not be freed */
|
||||||
splits = qof_query_run (gnc_ledger_display_get_query (priv->ledger));
|
splits = qof_query_run (gnc_ledger_display_get_query (priv->ledger));
|
||||||
|
|
||||||
/* Make sure each split is from the same account */
|
/* Make sure each split is from the same account */
|
||||||
for (item = splits; item; item = g_list_next (item))
|
for (item = splits; item; item = g_list_next (item))
|
||||||
{
|
{
|
||||||
@ -3786,7 +3789,6 @@ gnc_plugin_page_register_cmd_print_check (GtkAction* action,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
gnc_ui_print_check_dialog_create (window, splits);
|
gnc_ui_print_check_dialog_create (window, splits);
|
||||||
g_list_free (splits);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user