From 7a4c0ff35e10fba5f2686e7fd5623eab31b07a2d Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Wed, 13 Sep 2017 13:34:22 -0300 Subject: Fix crash when no audio driver is available --- platform/javascript/os_javascript.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'platform/javascript') diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index ac8d367366..c7484b593f 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -464,11 +464,7 @@ void OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, i print_line("Init Audio"); AudioDriverManager::add_driver(&audio_driver_javascript); - audio_driver_javascript.set_singleton(); - if (audio_driver_javascript.init() != OK) { - - ERR_PRINT("Initializing audio failed."); - } + AudioDriverManager::initialize(p_audio_driver); RasterizerGLES3::register_config(); RasterizerGLES3::make_current(); -- cgit v1.2.3