restore 'double checked locking'

This commit is contained in:
fredb
2007-01-29 08:19:13 +00:00
parent ad9341835f
commit aacdcad529

View 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);