Import Matcher: Fix nullptr hash index crash.

This commit is contained in:
John Ralls 2022-08-22 09:56:21 -07:00
parent 2c5a5a0485
commit f412d91095

View File

@ -1027,7 +1027,7 @@ setup_entry (GtkWidget *entry, gboolean sensitive, GHashTable *hash,
list = gtk_list_store_new (NUM_COMPLETION_COLS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
g_hash_table_foreach (hash, (GHFunc)populate_list, list);
if (!g_hash_table_lookup (hash, (gpointer)initial))
if (initial && !g_hash_table_lookup (hash, (gpointer)initial))
populate_list ((gpointer)initial, NULL, list);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list),
COMPLETION_LIST_ORIGINAL,