aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-04-16 19:31:06 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-04-16 19:31:06 +0000
commit708dae1a17665c8dd4ccac770e4b509dc09fc0b1 (patch)
tree5d9be867fa5a84011c443ccc3c1d71e519bcb578 /capture.c
parent4eb2c02901a9a566a8c54c30e485909feaa9c7b9 (diff)
bugfix: don't crash on error in normal mode capture
svn path=/trunk/; revision=14104
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/capture.c b/capture.c
index 200ddb452f..e6cfde0fde 100644
--- a/capture.c
+++ b/capture.c
@@ -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? */