Explorar el Código

use nstack only when walkers output needed (#332)

Anna Petrasova hace 5 años
padre
commit
1c7d321ef1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      raster/r.sim/simlib/hydro.c

+ 1 - 1
raster/r.sim/simlib/hydro.c

@@ -375,7 +375,7 @@ void main_loop(void)
             /* Changes made by Soeren 8. Mar 2011 to replace the site walker output implementation */
             /* Changes made by Soeren 8. Mar 2011 to replace the site walker output implementation */
             /* Save all walkers located within the computational region and with valid 
             /* Save all walkers located within the computational region and with valid 
                z coordinates */
                z coordinates */
-            if ((i == miter || i == iter1)) {	
+            if (outwalk != NULL && (i == miter || i == iter1)) {
                 nstack = 0;
                 nstack = 0;
                 
                 
                 for (lw = 0; lw < nwalk; lw++) {
                 for (lw = 0; lw < nwalk; lw++) {