mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
GISBASE string allocation
git-svn-id: http://svn.osgeo.org/qgis/trunk@2815 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
1a11351636
commit
a333748f2f
@ -171,7 +171,10 @@ void QgsGrassPlugin::initGui()
|
||||
qDebug( "%s:%d Valid GRASS gisBase is: %s", __FILE__, __LINE__, (const char*)gisBase );
|
||||
#endif
|
||||
QString gisBaseEnv = "GISBASE=" + gisBase;
|
||||
putenv(const_cast<char *>(gisBaseEnv.ascii()));
|
||||
/* _Correct_ putenv() implementation is not making copy! */
|
||||
char *gisBaseEnvChar = new char[gisBaseEnv.length()+1];
|
||||
strcpy ( gisBaseEnvChar, const_cast<char *>(gisBaseEnv.ascii()) );
|
||||
putenv( gisBaseEnvChar );
|
||||
settings.writeEntry("/qgis/grass/gisbase", gisBase);
|
||||
|
||||
mCanvas = qGisInterface->getMapCanvas();
|
||||
|
Loading…
x
Reference in New Issue
Block a user