From 9dc6c454f49b5020db694efad9b1dd6a991fbd9f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 2 Nov 2017 11:42:25 +0000 Subject: [PATCH] Cleaned up getEnvVar usage --- src/osgViewer/ViewerBase.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osgViewer/ViewerBase.cpp b/src/osgViewer/ViewerBase.cpp index 4881bf7a2..9184ff79a 100644 --- a/src/osgViewer/ViewerBase.cpp +++ b/src/osgViewer/ViewerBase.cpp @@ -214,8 +214,7 @@ void ViewerBase::setThreadingModel(ThreadingModel threadingModel) ViewerBase::ThreadingModel ViewerBase::suggestBestThreadingModel() { std::string str; - osg::getEnvVar("OSG_THREADING", str); - if (!str.empty()) + if (osg::getEnvVar("OSG_THREADING", str)) { if (str=="SingleThreaded") return SingleThreaded; else if (str=="CullDrawThreadPerContext") return CullDrawThreadPerContext;