Skip to content

Commit

Permalink
fix ios crash on terminate(audioserverSW)
Browse files Browse the repository at this point in the history
  • Loading branch information
amugana authored and amugana committed Jun 5, 2018
1 parent 30a86a3 commit e7f9c48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions platform/iphone/os_iphone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,14 @@ void OSIPhone::delete_main_loop() {

void OSIPhone::finalize() {

audio_driver->finish();

if (main_loop) // should not happen?
memdelete(main_loop);

audio_server->finish();
memdelete(audio_server);

visual_server->finish();
memdelete(visual_server);
memdelete(rasterizer);
Expand Down
3 changes: 2 additions & 1 deletion servers/audio/audio_server_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ void AudioServerSW::_thread_func(void *self) {

while (!as->exit_update_thread) {
as->_update_streams(true);
OS::get_singleton()->delay_usec(5000);
if (OS::get_singleton())
OS::get_singleton()->delay_usec(5000);
}
}

Expand Down

0 comments on commit e7f9c48

Please sign in to comment.