mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798944 - Program crashes when matching transactions
Add a mutex to refresh_old_transactions to prevent recursively calling gtk_list_store_clear().
This commit is contained in:
parent
d6a025e153
commit
a2f88f6f97
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user