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;