diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 3083ae7bbdf2..5806ee3f3f40 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -957,8 +957,8 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) { NativeScriptLanguage::NativeScriptLanguage() { NativeScriptLanguage::singleton = this; - has_objects_to_register = false; #ifndef NO_THREADS + has_objects_to_register = false; mutex = Mutex::create(); #endif }