diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2015-06-24 15:41:22 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-06-25 15:55:36 +0000 |
commit | cb840222963f4986a831d5d6f9eb28d1d45083f6 (patch) | |
tree | f2bdb1babecf770ce0564cbab356ff95cd356e9a /file.c | |
parent | 1810112f2d93d862c8b558279f5537e4db0fa4ad (diff) |
Qt: fix crashes when Wireshark is closed while running a capture
if we haven't captured any packets yet, don't display a warning about
unsaved changes
make sure that we're not running into a scenario where
MainWindow::testCaptureFileClose() tries to close the capture file at
the same time as the pipe handler who sees an eof on the pipe
cf_has_unsaved_data() should return false if we have a temporary file
that contains no packets
Change-Id: I18d75bd658b85d45dd3313d49e2cd654c6300de5
Reviewed-on: https://code.wireshark.org/review/9109
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4336,7 +4336,7 @@ cf_has_unsaved_data(capture_file *cf) * If this is a temporary file, or a file with unsaved changes, it * has unsaved data. */ - return cf->is_tempfile || cf->unsaved_changes; + return (cf->is_tempfile && cf->count>0) || cf->unsaved_changes; } /* |