]> git.mxchange.org Git - simgear.git/commitdiff
Use a reference counted pointer for the condition.
authorfrohlich <frohlich>
Wed, 11 Mar 2009 05:34:02 +0000 (05:34 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 11 Mar 2009 19:06:57 +0000 (20:06 +0100)
Modified Files:
simgear/sound/xmlsound.hxx simgear/sound/xmlsound.cxx

simgear/sound/xmlsound.cxx
simgear/sound/xmlsound.hxx

index 18850f84b866a1fc38a7bb7e788be45cc6eb6358..474386039fd6147fa66dc128b61edc3476801dd8 100644 (file)
@@ -63,7 +63,6 @@ static const struct {
 
 SGXmlSound::SGXmlSound()
   : _sample(NULL),
-    _condition(NULL),
     _active(false),
     _name(""),
     _mode(SGXmlSound::ONCE),
@@ -80,8 +79,6 @@ SGXmlSound::~SGXmlSound()
     if (_sample)
         _sample->stop();
 
-    delete _condition;
-
     _volume.clear();
     _pitch.clear();
 }
index 66caa1396b670fcd8cea3b46d66a847f03fa700f..d161bbca4acf5f32035da558f38d26963d18ba22 100644 (file)
@@ -138,7 +138,7 @@ private:
   SGSoundMgr * _mgr;
   SGSharedPtr<SGSoundSample> _sample;
 
-  SGCondition * _condition;
+  SGSharedPtr<SGCondition> _condition;
   SGPropertyNode_ptr _property;
 
   bool _active;