diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 8104d481e..bbcf24bd5 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -654,7 +654,7 @@ void CompositeViewer::realize() if (osg::DisplaySettings::instance()->getCompileContextsHint()) { - int numProcessors = OpenThreads::GetNumberOfProcessors(); + int numProcessors = osg::minimum(1, OpenThreads::GetNumberOfProcessors()); int processNum = 0; for(unsigned int i=0; i<= osg::GraphicsContext::getMaxContextID(); ++i)