gnucash stable: Bug 798944 - Program crashes when matching transactions

John Ralls jralls at code.gnucash.org
Thu Jul 27 16:14:51 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/a2f88f6f (commit)
	from  https://github.com/Gnucash/gnucash/commit/d6a025e1 (commit)



commit a2f88f6f974713b7c1d2a34487b5b6af7f0a310e
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 27 12:53:52 2023 -0700

    Bug 798944 - Program crashes when matching transactions
    
    Add a mutex to refresh_old_transactions to prevent recursively calling
    gtk_list_store_clear().

diff --git a/gnucash/import-export/qif-imp/assistant-qif-import.c b/gnucash/import-export/qif-imp/assistant-qif-import.c
index 4117d990a0..236bcea363 100644
--- a/gnucash/import-export/qif-imp/assistant-qif-import.c
+++ b/gnucash/import-export/qif-imp/assistant-qif-import.c
@@ -1147,10 +1147,14 @@ refresh_old_transactions (QIFImportWindow * wind, int selection)
     GtkTreeView *view;
     GtkListStore *store;
     GtkTreeIter iter;
+    static GMutex mutex;
+    if (!g_mutex_trylock(&mutex))
+      return;
 
     view = GTK_TREE_VIEW(wind->old_transaction_view);
     store = GTK_LIST_STORE(gtk_tree_view_get_model (view));
     gtk_list_store_clear (store);
+    g_mutex_unlock (&mutex);
 
     if (wind->match_transactions != SCM_BOOL_F)
     {



Summary of changes:
 gnucash/import-export/qif-imp/assistant-qif-import.c | 4 ++++
 1 file changed, 4 insertions(+)



More information about the gnucash-changes mailing list