Ver código fonte

use nstack only when walkers output needed (#332)

Anna Petrasova 5 anos atrás
pai
commit
1c7d321ef1
1 arquivos alterados com 1 adições e 1 exclusões
  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 */
             /* Save all walkers located within the computational region and with valid 
                z coordinates */
-            if ((i == miter || i == iter1)) {	
+            if (outwalk != NULL && (i == miter || i == iter1)) {
                 nstack = 0;
                 
                 for (lw = 0; lw < nwalk; lw++) {