Fix the crash that occurs on termination of the Godot engine on Android

This commit is contained in:
Fredia Huya-Kouadio 2024-07-29 09:20:50 -07:00
parent 0e9caa2d9c
commit 30d63e8ab9

View File

@ -83,6 +83,10 @@ static Vector3 magnetometer;
static Vector3 gyroscope;
static void _terminate(JNIEnv *env, bool p_restart = false) {
if (step.get() == STEP_TERMINATED) {
return;
}
step.set(STEP_TERMINATED); // Ensure no further steps are attempted and no further events are sent
// lets cleanup