Moved getenv usage across to safer osg::getEnvVar() usage
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <osg/View>
|
||||
#include <osg/GLObjects>
|
||||
#include <osg/ContextData>
|
||||
#include <osg/EnvVar>
|
||||
|
||||
#include <osg/FrameBufferObject>
|
||||
#include <osg/Program>
|
||||
@@ -153,10 +154,10 @@ std::string GraphicsContext::ScreenIdentifier::displayName() const
|
||||
|
||||
void GraphicsContext::ScreenIdentifier::readDISPLAY()
|
||||
{
|
||||
const char* ptr = 0;
|
||||
if ((ptr=getenv("DISPLAY")) != 0)
|
||||
std::string str;
|
||||
if (getEnvVar("DISPLAY", str))
|
||||
{
|
||||
setScreenIdentifier(ptr);
|
||||
setScreenIdentifier(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user