Skip to content

Commit

Permalink
Bug 797670 - scheduled transaction editor can remain open when switch…
Browse files Browse the repository at this point in the history
…ing file, which causes seg fault when later closed
  • Loading branch information
jean committed Apr 25, 2020
1 parent 8f5094f commit 4cca84b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gnucash/gnome/dialog-sx-editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include "gnucash-sheet.h"
#include "gnc-session.h"

#include "gnc-split-reg.h"

Expand Down Expand Up @@ -1123,6 +1124,7 @@ gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent,
GtkBuilder *builder;
GtkWidget *button;
int i;
gint id;
GList *dlgExists = NULL;

static struct widgetSignalCallback
Expand Down Expand Up @@ -1208,10 +1210,12 @@ gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent,
TRUE, TRUE, 0 );
}

gnc_register_gui_component( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
id = gnc_register_gui_component( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
NULL, /* no refresh handler */
sxed_close_handler,
sxed );
// This ensure this dialog is closed when the session is closed.
gnc_gui_component_set_session (id,gnc_get_current_session());

g_signal_connect( sxed->dialog, "delete_event",
G_CALLBACK(sxed_delete_event), sxed );
Expand Down

0 comments on commit 4cca84b

Please sign in to comment.