From 9792214ca6b95f64498e0c1468a9560313de97c0 Mon Sep 17 00:00:00 2001 From: Josh Borrow <joshua.borrow@durham.ac.uk> Date: Fri, 29 May 2020 17:10:30 +0100 Subject: [PATCH] Removed check on output_list->output_list_on as this was causing a segfault when no output_list was used --- src/distributed_io.c | 2 +- src/parallel_io.c | 4 ++-- src/serial_io.c | 2 +- src/single_io.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/distributed_io.c b/src/distributed_io.c index bee5b415df..d37873f406 100644 --- a/src/distributed_io.c +++ b/src/distributed_io.c @@ -707,7 +707,7 @@ void write_output_distributed(struct engine* e, /* Write everything that is not cancelled */ char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; - if (output_list->output_list_on) { + if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ output_list_get_current_select_output(output_list, diff --git a/src/parallel_io.c b/src/parallel_io.c index eab2a820f0..5961c919d6 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -1261,7 +1261,7 @@ void prepare_file(struct engine* e, const char* fileName, /* Prepare everything that is not cancelled */ char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; - if (output_list->output_list_on) { + if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ output_list_get_current_select_output(output_list, @@ -1777,7 +1777,7 @@ void write_output_parallel(struct engine* e, /* Write everything that is not cancelled */ char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; - if (output_list->output_list_on) { + if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ output_list_get_current_select_output(output_list, diff --git a/src/serial_io.c b/src/serial_io.c index 366c2dbe58..63318487a0 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -1390,7 +1390,7 @@ void write_output_serial(struct engine* e, /* Write everything that is not cancelled */ char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; - if (output_list->output_list_on) { + if (output_list) { /* Users could have specified a different Select Output scheme for * each snapshot. */ output_list_get_current_select_output(output_list, diff --git a/src/single_io.c b/src/single_io.c index db19f7f04a..056c8d1b84 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -1174,7 +1174,7 @@ void write_output_single(struct engine* e, /* Write everything that is not cancelled */ char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; - if (output_list->output_list_on) { + if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ output_list_get_current_select_output(output_list, -- GitLab