Merge pull request #113159 from dsnopek/android-variant-to-jvalue-memory-issues

Android: Fix memory issues in `_variant_to_jvalue()`
This commit is contained in:
Rémi Verschelde 2025-11-27 09:56:04 +01:00
commit b22d15311c
No known key found for this signature in database
GPG key ID: C3336907360768E1
7 changed files with 70 additions and 77 deletions

View file

@ -536,7 +536,7 @@ JNIEXPORT jobject JNICALL Java_org_godotengine_godot_GodotLib_getEditorProjectMe
String key = jstring_to_string(p_key, env);
Variant default_value = _jobject_to_variant(env, p_default_value);
Variant data = EditorSettings::get_singleton()->get_project_metadata(section, key, default_value);
result = _variant_to_jvalue(env, data.get_type(), &data, true);
result.l = _variant_to_jobject(env, data.get_type(), &data);
}
#else
WARN_PRINT("Access to the Editor Settings Project Metadata is only available on Editor builds");