Skip to content

Commit

Permalink
[import-main-matcher] initialize hash tables in common setup
Browse files Browse the repository at this point in the history
... otherwise the hash tables aren't initialized when the CSV importer
calls the import matcher.
  • Loading branch information
christopherlam committed Sep 20, 2022
1 parent 2505955 commit 3e4a4db
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gnucash/import-export/import-main-matcher.c
Expand Up @@ -1676,6 +1676,10 @@ gnc_gen_trans_common_setup (GNCImportMainMatcher *info,
if (heading)
gtk_label_set_text (GTK_LABEL(heading_label), heading);

info->desc_hash = g_hash_table_new (g_str_hash, g_str_equal);
info->notes_hash = g_hash_table_new (g_str_hash, g_str_equal);
info->memo_hash = g_hash_table_new (g_str_hash, g_str_equal);
info->new_strings = NULL;
info->transaction_processed_cb = NULL;

/* Connect the signals */
Expand Down Expand Up @@ -1731,11 +1735,6 @@ gnc_gen_trans_list_new (GtkWidget *parent,
// This ensure this dialog is closed when the session is closed.
gnc_gui_component_set_session (info->id, gnc_get_current_session());

info->desc_hash = g_hash_table_new (g_str_hash, g_str_equal);
info->notes_hash = g_hash_table_new (g_str_hash, g_str_equal);
info->memo_hash = g_hash_table_new (g_str_hash, g_str_equal);

info->new_strings = NULL;
return info;
}

Expand Down

0 comments on commit 3e4a4db

Please sign in to comment.