Skip to content

Commit 11b0ab7

Browse files
jeyum2Bromeon
authored andcommitted
Disable main_thread_id assertion for Android debug build
This code block causes a runtime panic during initializing in Android debug builds Signed-off-by: Jan Haller <[email protected]>
1 parent c6d68f4 commit 11b0ab7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

godot-ffi/src/binding/single_threaded.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ impl BindingStorage {
147147

148148
// We only check if we are in the main thread in debug builds if we aren't building for a non-threaded Godot build,
149149
// since we could otherwise assume there won't be multi-threading.
150-
#[cfg(all(debug_assertions, not(wasm_nothreads)))]
150+
// TODO: figure out why the panic happens on Android, and how to resolve it. See https://github.com/godot-rust/gdext/pull/780.
151+
#[cfg(all(debug_assertions, not(wasm_nothreads), not(target_os = "android")))]
151152
{
152153
let main_thread_id = storage.main_thread_id.get().expect(
153154
"Godot engine not available; make sure you are not calling it from unit/doc tests",

0 commit comments

Comments
 (0)