From 2ef335d9c70f41927d10c3379b39802096994f5e Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 6 Dec 2014 13:53:34 +0100 Subject: [PATCH] Bug 740471 - Applying payment to invoice Segmentation fault Stop listening for gui update events while on the way out (after the ok button was pressed). --- src/business/business-gnome/dialog-payment.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/business/business-gnome/dialog-payment.c b/src/business/business-gnome/dialog-payment.c index 3767f37579..298cb6981f 100644 --- a/src/business/business-gnome/dialog-payment.c +++ b/src/business/business-gnome/dialog-payment.c @@ -649,6 +649,17 @@ gnc_payment_ok_cb (GtkWidget *widget, gpointer data) * and amount so we can proceed with the payment. * Note: make sure it's called before all entry points to this function ! */ + + /* We're on our way out, stop watching for object changes that could + * trigger a gui refresh. Without this the gui suspend/resume + * pair could still trigger a gui update on the payment dialog + * before we close it. This is undesired because the lots may be in + * an inconsistent state until after all events are handled. So + * the gui refresh may result in a crash. + * See https://bugzilla.gnome.org/show_bug.cgi?id=740471 + */ + gnc_gui_component_clear_watches (pw->component_id); + gnc_suspend_gui_refresh (); { const char *memo, *num;