forked from osmocom/wireshark
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>
This commit is contained in:
parent
d3bb3a03b8
commit
44ba346c48
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue