mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797638 - SIGSEGV editing transaction after closing Find Accounts dialog.
Crash was from dangling qof-event handler because the dialog was closed with the title-bar button instead of the close button. Since the close button destroys the window, simply moving the other calls in close_handler to destroy_cb causes the titlebar close button to behave the same as the close button and prevents the crash. message for your changes. Lines starting
This commit is contained in:
parent
447de7f64d
commit
c3c0d95bf0
@ -77,8 +77,19 @@ gnc_find_account_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data
|
|||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
gnc_unregister_gui_component_by_data (DIALOG_FIND_ACCOUNT_CM_CLASS, facc_dialog);
|
gnc_unregister_gui_component_by_data (DIALOG_FIND_ACCOUNT_CM_CLASS, facc_dialog);
|
||||||
|
|
||||||
|
if (facc_dialog->event_handler_id)
|
||||||
|
{
|
||||||
|
qof_event_unregister_handler (facc_dialog->event_handler_id);
|
||||||
|
facc_dialog->event_handler_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (facc_dialog->saved_filter_text)
|
||||||
|
g_free (facc_dialog->saved_filter_text);
|
||||||
|
|
||||||
if (facc_dialog->window)
|
if (facc_dialog->window)
|
||||||
{
|
{
|
||||||
|
gnc_save_window_size (GNC_PREFS_GROUP,
|
||||||
|
GTK_WINDOW(facc_dialog->window));
|
||||||
gtk_widget_destroy (facc_dialog->window);
|
gtk_widget_destroy (facc_dialog->window);
|
||||||
facc_dialog->window = NULL;
|
facc_dialog->window = NULL;
|
||||||
}
|
}
|
||||||
@ -463,17 +474,6 @@ close_handler (gpointer user_data)
|
|||||||
FindAccountDialog *facc_dialog = user_data;
|
FindAccountDialog *facc_dialog = user_data;
|
||||||
|
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
|
|
||||||
if (facc_dialog->event_handler_id)
|
|
||||||
{
|
|
||||||
qof_event_unregister_handler (facc_dialog->event_handler_id);
|
|
||||||
facc_dialog->event_handler_id = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (facc_dialog->saved_filter_text)
|
|
||||||
g_free (facc_dialog->saved_filter_text);
|
|
||||||
|
|
||||||
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(facc_dialog->window));
|
|
||||||
gtk_widget_destroy (GTK_WIDGET(facc_dialog->window));
|
gtk_widget_destroy (GTK_WIDGET(facc_dialog->window));
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user