aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c
index b897d8bc9..79645244d 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -150,6 +150,7 @@ int isCurrentAudioFormat(AudioFormat * audioFormat) {
int openAudioDevice(AudioFormat * audioFormat) {
if(!aoOutput->open || !isCurrentAudioFormat(audioFormat)) {
+ if(!audioFormat) return -1;
copyAudioFormat(&audio_format, audioFormat);
if(shoutOutput) openAudioOutput(shoutOutput, audioFormat);
return openAudioOutput(aoOutput, audioFormat);