Skip to content

Commit

Permalink
Merge Jean Laroche's branch 'fix_seg_fault_in_matcher' into maint
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-IT committed May 3, 2020
2 parents 2f06392 + 92e9e60 commit 5ed6b42
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gnucash/import-export/import-main-matcher.c
Expand Up @@ -68,6 +68,7 @@ struct _main_matcher_info
GNCImportPendingMatches *pending_matches;
GtkTreeViewColumn *account_column;
gboolean add_toggled; // flag to indicate that add has been toggled to stop selection
gint id;
};

enum downloaded_cols
Expand Down Expand Up @@ -171,6 +172,7 @@ void gnc_gen_trans_list_delete (GNCImportMainMatcher *info)
{
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->main_widget));
gnc_import_Settings_delete (info->user_settings);
gnc_unregister_gui_component (info->id);
gtk_widget_destroy (GTK_WIDGET (info->main_widget));
}
else
Expand Down Expand Up @@ -924,7 +926,6 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
GtkStyleContext *stylectxt;
GdkRGBA color;
GtkWidget *button;
gint id;

info = g_new0 (GNCImportMainMatcher, 1);
info->pending_matches = gnc_import_PendingMatches_new();
Expand Down Expand Up @@ -981,12 +982,12 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
g_object_unref (G_OBJECT(builder));

// Register this UI, it needs to be closed when the session is closed.
id = gnc_register_gui_component (IMPORT_MAIN_MATCHER_CM_CLASS,
NULL, /* no refresh handler */
(GNCComponentCloseHandler)gnc_gen_trans_list_delete,
info);
info->id = gnc_register_gui_component (IMPORT_MAIN_MATCHER_CM_CLASS,
NULL, /* no refresh handler */
(GNCComponentCloseHandler)gnc_gen_trans_list_delete,
info);
// This ensure this dialog is closed when the session is closed.
gnc_gui_component_set_session (id, gnc_get_current_session());
gnc_gui_component_set_session (info->id, gnc_get_current_session());
return info;
}

Expand Down

0 comments on commit 5ed6b42

Please sign in to comment.