aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Mustakov2018-03-01 17:40:44 +0700
committerHein-Pieter van Braam2018-03-01 21:05:15 +0100
commit61a9ef5d81acad525cb1c98829b6be4e11f8bef0 (patch)
treecfcecedba0b1329301d05ad570946a08ce4cecee
parent9c27e4d88586287bca6292655e9800112f434ecd (diff)
downloadgodot-61a9ef5d81acad525cb1c98829b6be4e11f8bef0.tar.gz
godot-61a9ef5d81acad525cb1c98829b6be4e11f8bef0.tar.zst
godot-61a9ef5d81acad525cb1c98829b6be4e11f8bef0.zip
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. (cherry picked from commit c10749d51f2b77eb1b38909d790e7d3895a97364)
-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 87a7d04e0..0fe2db351 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -273,4 +273,5 @@ AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
mutex = Mutex::create(); //NULL;
pause = false;
+ active = false;
}