1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

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
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");