diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-06-16 14:32:58 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-16 15:19:30 +0000 |
commit | 44ba346c48511233d7ea2378ed32ca7a1132ba20 (patch) | |
tree | 263d63e6b77f68b8780fe1a6e389350b0a0a17c6 /ui/gtk | |
parent | d3bb3a03b84b8e6a8d1f89177d5303dfd1f5a992 (diff) |
gtk: Check chunk before g_string_chunk_clear
Avoid this warning from wireshark-gtk:
(wireshark-gtk:39505): GLib-CRITICAL **: g_string_chunk_clear: assertion
'chunk != NULL' failed
Change-Id: I413b3435a1ac595236dd1c4e619e3af1543b6a91
Reviewed-on: https://code.wireshark.org/review/15970
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/packet_list_store.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/gtk/packet_list_store.c b/ui/gtk/packet_list_store.c index bbfe866f2e..91c4c22f8a 100644 --- a/ui/gtk/packet_list_store.c +++ b/ui/gtk/packet_list_store.c @@ -585,7 +585,9 @@ packet_list_store_clear(PacketList *packet_list) /* Generate new number */ packet_list->stamp = g_random_int(); - g_string_chunk_clear(packet_list->string_pool); + if (packet_list->string_pool) { + g_string_chunk_clear(packet_list->string_pool); + } #ifdef PACKET_LIST_STATISTICS g_warning("Const strings: %u", packet_list->const_strings); |