git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71631 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -174,7 +174,8 @@ static int close_old(int fd)
if (fcb->map_type != CELL_TYPE) {
Rast_quant_free(&fcb->quant);
}
- close(fcb->data_fd);
+ if (fcb->data_fd >= 0)
+ close(fcb->data_fd);
return 1;