From 653c8212b9b85611283c8d2465e24b3365778bb4 Mon Sep 17 00:00:00 2001 From: Benjamin Kloster Date: Fri, 17 May 2013 22:15:28 +0200 Subject: [PATCH] Fix OgreEngine::update() to use RAII StateLock --- src/ogre/ogre_engine.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ogre/ogre_engine.cpp b/src/ogre/ogre_engine.cpp index b1916b13cad..d76ec68e85a 100644 --- a/src/ogre/ogre_engine.cpp +++ b/src/ogre/ogre_engine.cpp @@ -272,16 +272,12 @@ OgreEngine::shutdown() { void OgreEngine::update() { - // Lock shared state - InputState::instance().lockWorkingCopy(); - RenderState::instance().lockStable(); + StateLock inputLock; + StateLock renderLock; // Handle events Ogre::WindowEventUtilities::messagePump(); // Update systems Engine::update(); - // Release shared state - RenderState::instance().releaseStable(); - InputState::instance().releaseWorkingCopy(); }