Fix possible crash on macOS wake.

This commit is contained in:
John Preston 2020-11-05 15:05:29 +03:00
parent c0043d56ea
commit 3fdd6848c5

View file

@ -157,11 +157,13 @@ ApplicationDelegate *_sharedDelegate = nil;
}
- (void) receiveWakeNote:(NSNotification*)aNotification {
if (Core::IsAppLaunched()) {
Core::App().checkLocalTime();
if (!Core::IsAppLaunched()) {
return;
}
Core::App().checkLocalTime();
LOG(("Audio Info: -receiveWakeNote: received, scheduling detach from audio device"));
LOG(("Audio Info: "
"-receiveWakeNote: received, scheduling detach from audio device"));
Media::Audio::ScheduleDetachFromDeviceSafe();
}