gnucash maint: Multiple changes pushed
Robert Fewell
bobit at code.gnucash.org
Sun May 3 06:18:56 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/5ed6b424 (commit)
via https://github.com/Gnucash/gnucash/commit/92e9e60c (commit)
from https://github.com/Gnucash/gnucash/commit/2f063923 (commit)
commit 5ed6b424ddce13db3450a483bcb3e7ed2a08f9cd
Merge: 2f0639235 92e9e60cd
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Sun May 3 11:12:58 2020 +0100
Merge Jean Laroche's branch 'fix_seg_fault_in_matcher' into maint
commit 92e9e60cd027e8b1f79bc04a79005129c8149293
Author: jean <you at example.com>
Date: Sat May 2 21:10:38 2020 -0700
Fix the crash that occurs when opening a new book when the transaction-matching dialog has been opened then closed.
diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index 8851da8b2..b9889ee76 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -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
@@ -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
@@ -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();
@@ -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;
}
Summary of changes:
gnucash/import-export/import-main-matcher.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
More information about the gnucash-changes
mailing list