path: root/file.c
diff options
authorMichael Mann <mmann78@netscape.net>2015-04-04 19:24:22 -0400
committerMichael Mann <mmann78@netscape.net>2015-04-07 01:16:26 +0000
commita11f7a75486abe3b2fdb7e8ba61e41b40b738dee (patch)
tree87339c06673b0bdfb40ffa459bee6694e7918f20 /file.c
parent3a87a32a578b3aa15cd20477a633922cc3dd2f41 (diff)
Don't rescan packets when a display filter is added if we are capturing without "Updating list of packets in real time". There are no displayed packets to filter!
Bug: 6217 Change-Id: Ie4a90ff8a738d6c970d51598bf14b4b51ea069ce Reviewed-on: https://code.wireshark.org/review/7918 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'file.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index bee2adfe30..8dc9a35122 100644
--- a/file.c
+++ b/file.c
@@ -1688,6 +1688,9 @@ cf_filter_packets(capture_file *cf, gchar *dftext, gboolean force)
cf->dfilter = dftext;
+ /* if we are capturing without displaying packets, there is nothing to filter */
+ if (cf->frames == NULL)
+ return CF_ERROR;
/* Now rescan the packet list, applying the new filter, but not
throwing away information constructed on a previous pass. */