diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-04-16 19:31:06 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-04-16 19:31:06 +0000 |
commit | 708dae1a17665c8dd4ccac770e4b509dc09fc0b1 (patch) | |
tree | 5d9be867fa5a84011c443ccc3c1d71e519bcb578 | |
parent | 4eb2c02901a9a566a8c54c30e485909feaa9c7b9 (diff) | |
download | wireshark-708dae1a17665c8dd4ccac770e4b509dc09fc0b1.tar.gz wireshark-708dae1a17665c8dd4ccac770e4b509dc09fc0b1.tar.bz2 wireshark-708dae1a17665c8dd4ccac770e4b509dc09fc0b1.zip |
bugfix: don't crash on error in normal mode capture
svn path=/trunk/; revision=14104
-rw-r--r-- | capture.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -330,9 +330,16 @@ capture_input_closed(capture_options *capture_opts) /* first of all, we are not doing a capture any more */ cf_callback_invoke(cf_cb_live_capture_fixed_finished, capture_opts->cf); - /* this is a normal mode capture, read in the capture file data */ - capture_input_read_all(capture_opts, cf_is_tempfile(capture_opts->cf), - cf_get_drops_known(capture_opts->cf), cf_get_drops(capture_opts->cf)); + /* this is a normal mode capture and if no error happened, read in the capture file data */ + if(capture_opts->save_file != NULL) { + capture_input_read_all(capture_opts, cf_is_tempfile(capture_opts->cf), + cf_get_drops_known(capture_opts->cf), cf_get_drops(capture_opts->cf)); + } + } + + /* if we couldn't open a capture file, there's nothing more for us to do */ + if(capture_opts->save_file == NULL) { + return; } /* does the user wants to restart the current capture? */ |