[Fix] Segfault when running Lephisto muted.
This commit is contained in:
parent
87514e63a7
commit
3f269033be
@ -550,6 +550,8 @@ void voice_update(alVoice* voice, double px, double py, double vx, double vy) {
|
|||||||
|
|
||||||
// Changes the voice's buffer.
|
// Changes the voice's buffer.
|
||||||
void voice_buffer(alVoice* voice, const ALuint buffer, const unsigned int flags) {
|
void voice_buffer(alVoice* voice, const ALuint buffer, const unsigned int flags) {
|
||||||
|
if(voice == NULL) return;
|
||||||
|
|
||||||
voice->buffer = buffer;
|
voice->buffer = buffer;
|
||||||
voice_parseFlags(voice, flags);
|
voice_parseFlags(voice, flags);
|
||||||
|
|
||||||
@ -561,6 +563,8 @@ void voice_buffer(alVoice* voice, const ALuint buffer, const unsigned int flags)
|
|||||||
|
|
||||||
// Stop playing sound.
|
// Stop playing sound.
|
||||||
void voice_stop(alVoice* voice) {
|
void voice_stop(alVoice* voice) {
|
||||||
|
if(voice == NULL) return;
|
||||||
|
|
||||||
soundLock();
|
soundLock();
|
||||||
if(voice->source != 0)
|
if(voice->source != 0)
|
||||||
alSourceStop(voice->source);
|
alSourceStop(voice->source);
|
||||||
|
Loading…
Reference in New Issue
Block a user