about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-09-25 20:38:33 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-09-25 20:38:33 +0000
commita554203943cde311a93090805b40f3d39ccc75d2 (patch)
tree43be8d0a2e63898a2a4d0309fa84b3c2587d38b8 /src
parent720db230586420704f1734303a3150fbe7bcc67c (diff)
downloadzcatch-a554203943cde311a93090805b40f3d39ccc75d2.tar.gz
zcatch-a554203943cde311a93090805b40f3d39ccc75d2.zip
fixed so the game doesn't crash when the soundsystem cound't init
Diffstat (limited to 'src')
-rw-r--r--src/engine/client/snd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/engine/client/snd.c b/src/engine/client/snd.c
index 7ea5e752..da18a3be 100644
--- a/src/engine/client/snd.c
+++ b/src/engine/client/snd.c
@@ -259,6 +259,8 @@ int snd_init()
 	PaStreamParameters params;
 	PaError err = Pa_Initialize();
 	params.device = Pa_GetDefaultOutputDevice();
+	if(params.device < 0)
+		return 1;
 	params.channelCount = 2;
 	params.sampleFormat = paInt16;
 	params.suggestedLatency = Pa_GetDeviceInfo(params.device)->defaultLowOutputLatency;