diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp index 2a4d65de1f..b349cbd671 100644 --- a/src/VORONOI/compute_voronoi_atom.cpp +++ b/src/VORONOI/compute_voronoi_atom.cpp @@ -305,7 +305,8 @@ void ComputeVoronoi::buildCells() } // clear edge statistics - for (i = 0; i <= maxedge; ++i) edge[i]=0; + if ( maxedge > 0 ) + for (i = 0; i <= maxedge; ++i) edge[i]=0; // initialize voro++ container // preallocates 8 atoms per cell