diff --git a/src/osgViewer/ViewerBase.cpp b/src/osgViewer/ViewerBase.cpp index 4b72f5c20..f5b325895 100644 --- a/src/osgViewer/ViewerBase.cpp +++ b/src/osgViewer/ViewerBase.cpp @@ -205,11 +205,13 @@ void ViewerBase::setThreadingModel(ThreadingModel threadingModel) { if (_threadingModel == threadingModel) return; + bool needSetUpThreading = _threadsRunning; + if (_threadsRunning) stopThreading(); _threadingModel = threadingModel; - setUpThreading(); + if (needSetUpThreading) setUpThreading(); } ViewerBase::ThreadingModel ViewerBase::suggestBestThreadingModel()