Skip to content

Commit e28c24c

Browse files
author
jef
committedApr 19, 2009
merge r10596 to version 1.0
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10597 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f14d758 commit e28c24c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/providers/grass/qgsgrassprovider.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,12 @@ void QgsGrassProvider::closeMap( int mapId )
11491149

11501150
if ( mMaps[mapId].valid )
11511151
{
1152+
bool mapsetunset = G__getenv( "MAPSET" )==NULL || *G__getenv( "MAPSET" )==0;
1153+
if( mapsetunset )
1154+
G__setenv(( char * )"MAPSET", mMaps[mapId].mapset.toAscii().data() );
11521155
Vect_close( mMaps[mapId].map );
1156+
if( mapsetunset )
1157+
G__setenv(( char * )"MAPSET", "" );
11531158
}
11541159
mMaps[mapId].valid = false;
11551160
}
@@ -1304,7 +1309,7 @@ QgsCoordinateReferenceSystem QgsGrassProvider::crs()
13041309
struct Key_Value *projunits = G_get_projunits();
13051310
char *wkt = GPJ_grass_to_wkt( projinfo, projunits, 0, 0 );
13061311
Wkt = QString( wkt );
1307-
free( wkt );
1312+
G_free( wkt );
13081313
}
13091314

13101315
setlocale( LC_NUMERIC, oldlocale );

0 commit comments

Comments
 (0)
Please sign in to comment.