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)
341
341
342
342
static void InterruptionBegin (SDL_AudioDevice *device)
343
343
{
344
- if (device != NULL && device->hidden ->audioQueue != NULL ) {
344
+ if (device != NULL && device->hidden != NULL && device-> hidden ->audioQueue != NULL ) {
345
345
device->hidden ->interrupted = true ;
346
346
AudioQueuePause (device->hidden ->audioQueue );
347
347
}
@@ -366,7 +366,7 @@ - (void)audioSessionInterruption:(NSNotification *)note
366
366
{
367
367
@synchronized (self) {
368
368
NSNumber *type = note.userInfo [AVAudioSessionInterruptionTypeKey];
369
- if (type.unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) {
369
+ if (type && (type .unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) ) {
370
370
InterruptionBegin (self.device );
371
371
} else {
372
372
InterruptionEnd (self.device );
You can’t perform that action at this time.
0 commit comments