File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ static void ResumeAudioDevices(void)
341341
342342static void InterruptionBegin (SDL_AudioDevice *device)
343343{
344- if (device != NULL && device->hidden ->audioQueue != NULL ) {
344+ if (device != NULL && device->hidden != NULL && device-> hidden ->audioQueue != NULL ) {
345345 device->hidden ->interrupted = true ;
346346 AudioQueuePause (device->hidden ->audioQueue );
347347 }
@@ -366,7 +366,7 @@ - (void)audioSessionInterruption:(NSNotification *)note
366366{
367367 @synchronized (self) {
368368 NSNumber *type = note.userInfo [AVAudioSessionInterruptionTypeKey];
369- if (type.unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) {
369+ if (type && (type .unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) ) {
370370 InterruptionBegin (self.device );
371371 } else {
372372 InterruptionEnd (self.device );
You can’t perform that action at this time.
0 commit comments