Ver código fonte

fixed crash in AudioBuffer's destructor

Andrew Karpushin 11 anos atrás
pai
commit
061b3b83f5
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      gameplay/src/AudioSource.cpp

+ 3 - 0
gameplay/src/AudioSource.cpp

@@ -37,6 +37,9 @@ AudioSource::~AudioSource()
             GP_ASSERT(audioController);
             audioController->removePlayingSource(this);
         }
+
+        AL_CHECK(alDeleteSources(1, &_alSource));
+        _alSource = 0;
     }
     SAFE_RELEASE(_buffer);
 }