commit 3a87861339379f7129cf2e0c654c4855c6cc7e6d
parent 12aefb3e0cc6e1de0df0a33fa034383802e28fc4
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sun, 2 May 2010 10:39:03 -0400
OssEngine: preventing segfault
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Nio/OssEngine.cpp b/src/Nio/OssEngine.cpp
@@ -98,7 +98,7 @@ void OssEngine::stopAudio()
return;
audio.handle = -1;
- if(!getMidiEn())
+ if(!getMidiEn() && engThread)
pthread_join(*engThread, NULL);
delete engThread;
engThread = NULL;
@@ -187,7 +187,7 @@ void OssEngine::stopMidi()
midi.handle = -1;
- if(!getAudioEn()) {
+ if(!getAudioEn() && engThread) {
pthread_join(*engThread, NULL);
delete engThread;
engThread = NULL;