diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index 328a10cd1b..d360e92b19 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -729,6 +729,7 @@ namespace Resource void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const { + if (mIncrementalCompileOperation) { OpenThreads::ScopedLock lock(*mIncrementalCompileOperation->getToCompiledMutex()); stats->setAttribute(frameNumber, "Compiling", mIncrementalCompileOperation->getToCompile().size());