From e723488aa3933ec0e56b8e09e44256f6dc5da344 Mon Sep 17 00:00:00 2001 From: Saracen Date: Sat, 31 Oct 2015 08:59:29 +0000 Subject: [PATCH] Moved deleting sample player in OS finalize methods to before deleting audio server to prevent crash when exiting. --- platform/bb10/os_bb10.cpp | 3 ++- platform/haiku/os_haiku.cpp | 3 ++- platform/server/os_server.cpp | 3 ++- platform/windows/os_windows.cpp | 3 ++- platform/winrt/os_winrt.cpp | 3 ++- platform/x11/os_x11.cpp | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp index d89033b1df0..c8e7ae561e7 100644 --- a/platform/bb10/os_bb10.cpp +++ b/platform/bb10/os_bb10.cpp @@ -195,9 +195,10 @@ void OSBB10::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 1edb23d5049..ef483657ca5 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -137,9 +137,10 @@ void OS_Haiku::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 75e0878bac3..8b831140d68 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -107,9 +107,10 @@ void OS_Server::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 438a5a69037..c6dae86222e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1373,9 +1373,10 @@ void OS_Windows::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); memdelete(input); diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index 3e06d9d59b9..02de262508b 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -326,10 +326,11 @@ void OSWinrt::finalize() { //if (debugger_connection_console) { // memdelete(debugger_connection_console); //} + + memdelete(sample_manager); audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); memdelete(input); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 34bd1184a1d..3218230d0bf 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -452,9 +452,10 @@ void OS_X11::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server);