summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Mustakov <r.mustakov@gmail.com>2018-03-01 17:40:44 +0700
committerRuslan Mustakov <r.mustakov@gmail.com>2018-03-01 17:40:44 +0700
commitc10749d51f2b77eb1b38909d790e7d3895a97364 (patch)
tree976ad2fe68a4f69fa9e57f36f78ddc1972ff6f1d
parent8df449100a3f9dde511d05087bef60a07fadefde (diff)
Fix intermittent audio driver crash during startup on Android
set_pause can be called before the driver is initialized, and there already is a check for that. The problem is that the 'active' field was not initialied in the constructor, which lead to it having an undefined value.
-rw-r--r--platform/android/audio_driver_opensl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index bc77a4e729..e6bd3ff253 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -271,4 +271,5 @@ AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
mutex = Mutex::create(); //NULL;
pause = false;
+ active = false;
}