aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio.c b/src/audio.c
index 713519f5c..3e61a6548 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -116,7 +116,7 @@ void finishAudioDriver() {
}
int isCurrentAudioFormat(AudioFormat * audioFormat) {
- if(!audio_device) return 0;
+ if(!audio_device || !audioFormat) return 0;
if(audio_format.bits!=audioFormat->bits ||
audio_format.sampleRate!=audioFormat->sampleRate ||
@@ -131,7 +131,7 @@ int isCurrentAudioFormat(AudioFormat * audioFormat) {
int initAudio(AudioFormat * audioFormat) {
ao_sample_format format;
- if(audioFormat && audio_device && !isCurrentAudioFormat(audioFormat)) {
+ if(audio_device && !isCurrentAudioFormat(audioFormat)) {
finishAudio();
}