[GRASS-SVN] r40419 - grass/trunk/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 13 15:00:39 EST 2010
Author: glynn
Date: 2010-01-13 15:00:39 -0500 (Wed, 13 Jan 2010)
New Revision: 40419
Modified:
grass/trunk/lib/raster/auto_mask.c
grass/trunk/lib/raster/init.c
Log:
Don't call Rast_unopen() on invalid R__.mask_fd
Modified: grass/trunk/lib/raster/auto_mask.c
===================================================================
--- grass/trunk/lib/raster/auto_mask.c 2010-01-13 11:56:08 UTC (rev 40418)
+++ grass/trunk/lib/raster/auto_mask.c 2010-01-13 20:00:39 UTC (rev 40419)
@@ -61,7 +61,8 @@
return 0;
}
- Rast_unopen(R__.mask_fd);
+ if (R__.mask_fd >= 0)
+ Rast_unopen(R__.mask_fd);
R__.mask_fd = Rast__open_old("MASK", G_mapset());
if (R__.mask_fd < 0) {
R__.auto_mask = 0;
Modified: grass/trunk/lib/raster/init.c
===================================================================
--- grass/trunk/lib/raster/init.c 2010-01-13 11:56:08 UTC (rev 40418)
+++ grass/trunk/lib/raster/init.c 2010-01-13 20:00:39 UTC (rev 40419)
@@ -83,6 +83,7 @@
/* Set masking flag unknown */
R__.auto_mask = -1;
+ R__.mask_fd = -1;
R__.nbytes = sizeof(CELL);
R__.compression_type = getenv("GRASS_INT_ZLIB") ? 2 : 1;
More information about the grass-commit
mailing list