]> git.mxchange.org Git - simgear.git/commitdiff
restore 'double checked locking'
authorfredb <fredb>
Mon, 29 Jan 2007 08:19:13 +0000 (08:19 +0000)
committerfredb <fredb>
Mon, 29 Jan 2007 08:19:13 +0000 (08:19 +0000)
simgear/scene/model/shadanim.cxx

index b631c7d5c176e59f61ee092f7767d23b4d09bc8b..60b4d3f9aa12d7b6ebbc0bda853044b76827b333 100644 (file)
@@ -126,7 +126,9 @@ private:
 static osg::TextureCubeMap*
 getOrCreateTextureCubeMap()
 {
-   static osg::ref_ptr<osg::TextureCubeMap> textureCubeMap;
+  static osg::ref_ptr<osg::TextureCubeMap> textureCubeMap;
+  if (textureCubeMap.get())
+    return textureCubeMap.get();
 
   static SGMutex mutex;
   SGGuard<SGMutex> locker(mutex);