diff options
author | Dario Lombardo <lomato@gmail.com> | 2015-10-13 12:16:18 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-10-14 05:46:51 +0000 |
commit | 26193199646a15de68893ccbfa23165e4a0bfb6b (patch) | |
tree | b9a4f4e9e5244c4786dc6202aeb9710768f67720 /ui | |
parent | fb36a457adabda8bcf8afd84f1d6ae12c950a5ae (diff) | |
download | wireshark-26193199646a15de68893ccbfa23165e4a0bfb6b.tar.gz |
gtk: add asserts.
Found by clang analyzer.
Change-Id: I1c8448f7402179d33d6ccb8b182b0612817a8e09
Reviewed-on: https://code.wireshark.org/review/10976
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/packet_list_store.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gtk/packet_list_store.c b/ui/gtk/packet_list_store.c index 75d1575d6a..c7598ebb4e 100644 --- a/ui/gtk/packet_list_store.c +++ b/ui/gtk/packet_list_store.c @@ -1030,9 +1030,11 @@ packet_list_resort(PacketList *packet_list) g_ptr_array_sort_with_data(packet_list->physical_rows, (GCompareDataFunc) packet_list_qsort_physical_compare_func, packet_list); + g_return_if_fail(packet_list->visible_rows != NULL); /* let other objects know about the new order */ neworder = g_new0(gint, PACKET_LIST_RECORD_COUNT(packet_list->visible_rows)); + g_assert(neworder); for(phy_idx = 0, vis_idx = 0; phy_idx < PACKET_LIST_RECORD_COUNT(packet_list->physical_rows); ++phy_idx) { record = PACKET_LIST_RECORD_GET(packet_list->physical_rows, phy_idx); |