gnucash maint: Bug 787439 - Segmentation Fault in Transfer dialog after clearing Date field and pressing escape
Geert Janssens
gjanssens at code.gnucash.org
Mon Sep 24 13:34:24 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/9261cabf (commit)
from https://github.com/Gnucash/gnucash/commit/c4b40dbf (commit)
commit 9261cabfbbfd1e391ae73672dc027fec9cbdd77c
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 24 19:34:18 2018 +0200
Bug 787439 - Segmentation Fault in Transfer dialog after clearing Date field and pressing escape
Disconnect date edit's focus-out callback before destroying the transfer dialog widget.
This should prevent the callback being triggered while the widget's internal state
is being destroyed.
diff --git a/gnucash/gnome-utils/dialog-transfer.c b/gnucash/gnome-utils/dialog-transfer.c
index 79dcad9..5971ddb 100644
--- a/gnucash/gnome-utils/dialog-transfer.c
+++ b/gnucash/gnome-utils/dialog-transfer.c
@@ -1686,6 +1686,13 @@ gnc_xfer_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
return;
}
+ /* We're closing, either by cancel, esc or ok
+ * Remove date changed handler to prevent it from triggering
+ * on a focus-out event while we're already destroying the widget */
+ g_signal_handlers_disconnect_by_func (G_OBJECT (xferData->date_entry),
+ G_CALLBACK (gnc_xfer_date_changed_cb),
+ xferData);
+
if (response != GTK_RESPONSE_OK)
{
gnc_close_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
Summary of changes:
gnucash/gnome-utils/dialog-transfer.c | 7 +++++++
1 file changed, 7 insertions(+)
More information about the gnucash-changes
mailing list