Skip to content

Commit

Permalink
Bug 748983 - Crash after opening money transfer dialog twice
Browse files Browse the repository at this point in the history
Prevent re-entrance by checking that the static pointers, the second
freeing of which caused the crash. Set said pointers to NULL after
freeing them to make the dialog ready for the next invocation.
  • Loading branch information
jralls committed Jun 22, 2016
1 parent 5ed8877 commit 1b3f711
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gnome-utils/dialog-transfer.c
Expand Up @@ -1871,6 +1871,7 @@ gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
{
GtkBuilder *builder;
gboolean use_accounting_labels;
g_return_if_fail(to_info == NULL && from_info == NULL);

use_accounting_labels = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL,
GNC_PREF_ACCOUNTING_LABELS);
Expand Down Expand Up @@ -2067,7 +2068,9 @@ close_handler (gpointer user_data)
gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData);
gtk_widget_destroy (dialog);
g_free (to_info);
to_info = NULL;
g_free (from_info);
from_info = NULL;
LEAVE(" ");
}

Expand Down

0 comments on commit 1b3f711

Please sign in to comment.