diff options
Diffstat (limited to 'ui/recent.c')
-rw-r--r-- | ui/recent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/recent.c b/ui/recent.c index e5a14fcaad..5568d136bb 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -333,6 +333,8 @@ recent_add_cfilter(const gchar *ifname, const gchar *s) if (ifname == NULL) cfilter_list = recent_cfilter_list; else { + /* If we don't yet have a hash table for per-interface recent + capture filter lists, create one. */ if (per_interface_cfilter_lists_hash == NULL) per_interface_cfilter_lists_hash = g_hash_table_new(g_str_hash, g_str_equal); cfilter_list = (GList *)g_hash_table_lookup(per_interface_cfilter_lists_hash, ifname); @@ -346,7 +348,7 @@ recent_add_cfilter(const gchar *ifname, const gchar *s) if (strcmp(s, li_filter) == 0) { /* No need to copy the string, we're just moving it. */ newfilter = li_filter; - recent_cfilter_list = g_list_remove(cfilter_list, li->data); + cfilter_list = g_list_remove(cfilter_list, li->data); break; } li = li->next; |