Skip to content

Commit

Permalink
fix #1460
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10596 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 19, 2009
1 parent 6779465 commit e59c8d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/providers/grass/qgsgrassprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,12 @@ void QgsGrassProvider::closeMap( int mapId )

if ( mMaps[mapId].valid )
{
bool mapsetunset = G__getenv( "MAPSET" )==NULL || *G__getenv( "MAPSET" )==0;
if( mapsetunset )
G__setenv(( char * )"MAPSET", mMaps[mapId].mapset.toAscii().data() );
Vect_close( mMaps[mapId].map );
if( mapsetunset )
G__setenv(( char * )"MAPSET", "" );
}
mMaps[mapId].valid = false;
}
Expand Down Expand Up @@ -1320,7 +1325,7 @@ QgsCoordinateReferenceSystem QgsGrassProvider::crs()
struct Key_Value *projunits = G_get_projunits();
char *wkt = GPJ_grass_to_wkt( projinfo, projunits, 0, 0 );
Wkt = QString( wkt );
free( wkt );
G_free( wkt );
}

setlocale( LC_NUMERIC, oldlocale );
Expand Down

0 comments on commit e59c8d5

Please sign in to comment.