Skip to content

Commit

Permalink
Bug 799429 - Crash when changing accounting period end date
Browse files Browse the repository at this point in the history
Remove the accounting period changed callbacks at GncPluginPage
destruction so that the destroyed page isn't called in the new
session.
  • Loading branch information
jralls committed Oct 8, 2024
1 parent c63d2dc commit fef0124
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion gnucash/gnome/gnc-plugin-page-account-tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,20 @@ gnc_plugin_page_account_tree_destroy_widget (GncPluginPage *plugin_page)
(gpointer)gnc_plugin_page_account_tree_summarybar_position_changed,
page);

// Save account filter state information to account section
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_CHOICE_ABS,
(gpointer)accounting_period_changed_cb, page);
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_DATE,
(gpointer)accounting_period_changed_cb, page);
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_PERIOD,
(gpointer)accounting_period_changed_cb, page);
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_END_CHOICE_ABS,
(gpointer)accounting_period_changed_cb, page);
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_END_DATE,
(gpointer)accounting_period_changed_cb, page);
gnc_prefs_remove_cb_by_func(GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_END_PERIOD,
(gpointer)accounting_period_changed_cb, page);

// Save account filter state information to account section
gnc_tree_view_account_save_filter (GNC_TREE_VIEW_ACCOUNT(priv->tree_view), &priv->fd,
gnc_state_get_current(), gnc_tree_view_get_state_section (GNC_TREE_VIEW(priv->tree_view)));

Expand Down

0 comments on commit fef0124

Please sign in to comment.