Use a reference counted pointer for the condition.
Modified Files: simgear/sound/xmlsound.hxx simgear/sound/xmlsound.cxx
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
SGSoundMgr * _mgr;
|
||||
SGSharedPtr<SGSoundSample> _sample;
|
||||
|
||||
SGCondition * _condition;
|
||||
SGSharedPtr<SGCondition> _condition;
|
||||
SGPropertyNode_ptr _property;
|
||||
|
||||
bool _active;
|
||||
|
||||
Reference in New Issue
Block a user