From 1a498348ee6d14be3e798714211970fe671ddf9f Mon Sep 17 00:00:00 2001 From: fredb Date: Sun, 1 Jun 2008 17:25:05 +0000 Subject: [PATCH] Fix non threadsafe code --- simgear/scene/util/SGSceneFeatures.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/util/SGSceneFeatures.cxx b/simgear/scene/util/SGSceneFeatures.cxx index ccefab95..71edb2eb 100644 --- a/simgear/scene/util/SGSceneFeatures.cxx +++ b/simgear/scene/util/SGSceneFeatures.cxx @@ -44,14 +44,14 @@ SGSceneFeatures::SGSceneFeatures() : { } +static SGMutex mutexSGSceneFeatures_instance; SGSceneFeatures* SGSceneFeatures::instance() { static SGSharedPtr sceneFeatures; if (sceneFeatures) return sceneFeatures; - static SGMutex mutex; - SGGuard guard(mutex); + SGGuard guard(mutexSGSceneFeatures_instance); if (sceneFeatures) return sceneFeatures; sceneFeatures = new SGSceneFeatures;