diff options
author | Joerg Mayer <jmayer@loplof.de> | 2017-02-20 21:44:27 +0100 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2017-02-20 23:06:10 +0000 |
commit | b82f7c5b7d30241dd190cd243111b224c2813c90 (patch) | |
tree | 97426bd96fc1a6f2358fe2fe68780a16881fc933 /ui/recent.c | |
parent | 124807e59debe31754092caacedfb29ccb14efd0 (diff) |
Calling g_hash_table_size with a NULL argument causes a GLib-CRITICAL.
This fixes the first issue appearing in the log of
Bug: 13418
Change-Id: I2fe68a06dd4a19be8300ec34be65a8dc47d0f8b3
Reviewed-on: https://code.wireshark.org/review/20214
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'ui/recent.c')
-rw-r--r-- | ui/recent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/recent.c b/ui/recent.c index b95ee65eb6..01204f5d72 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -384,6 +384,10 @@ static GHashTable *remote_host_list=NULL; int recent_get_remote_host_list_size(void) { + if (remote_host_list == NULL) { + /* No entries exist. */ + return 0; + } return g_hash_table_size (remote_host_list); } |