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).
This commit is contained in:
Geert Janssens 2014-12-06 13:53:34 +01:00
parent f4481f7dcf
commit 2ef335d9c7

View File

@ -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;