aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/file.c b/file.c
index fdbd4073e4..c97194f6e9 100644
--- a/file.c
+++ b/file.c
@@ -1471,10 +1471,12 @@ cf_filter_packets(capture_file *cf, gchar *dftext, gboolean force)
/* Now rescan the packet list, applying the new filter, but not
throwing away information constructed on a previous pass. */
- if (dftext == NULL) {
- rescan_packets(cf, "Resetting", "Filter", FALSE);
- } else {
- rescan_packets(cf, "Filtering", dftext, FALSE);
+ if (cf->state != FILE_CLOSED) {
+ if (dftext == NULL) {
+ rescan_packets(cf, "Resetting", "Filter", FALSE);
+ } else {
+ rescan_packets(cf, "Filtering", dftext, FALSE);
+ }
}
/* Cleanup and release all dfilter resources */