Sfoglia il codice sorgente

use nstack only when walkers output needed (#332)

Anna Petrasova 5 anni fa
parent
commit
e2d6fdd489
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      raster/r.sim/simlib/hydro.c

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

@@ -376,7 +376,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++) {