Skip to content
Snippets Groups Projects
Commit 481a716a authored by Berenger Bramas's avatar Berenger Bramas
Browse files

Ensure not to allocate if size is zero

parent f1b82656
No related branches found
No related tags found
1 merge request!23WIP: Feature/use cmake
Pipeline #
......@@ -176,7 +176,7 @@ public:
buffer_particles_rhs_send[idx_rhs].reset(new real_number[size_buffers_send*buffers_size_particle_rhs_send]);
}
}
else if(buffers_size_particle_rhs_send < size_particle_rhs && size_particle_rhs > 0){
else if(buffers_size_particle_rhs_send < size_particle_rhs && size_particle_rhs > 0 && size_buffers_send > 0){
buffers_size_particle_rhs_send = size_particle_rhs;
for(int idx_rhs = 0 ; idx_rhs < nb_rhs ; ++idx_rhs){
buffer_particles_rhs_send[idx_rhs].reset(new real_number[size_buffers_send*buffers_size_particle_rhs_send]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment