1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Fix user after free in GDScriptLanguage::debug_get_globals

This commit is contained in:
ACB
2024-03-08 07:32:31 +01:00
parent bb6b06c813
commit 7426b4d448

View File

@@ -402,7 +402,9 @@ void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant>
}
const Variant &var = gl_array[E.value];
if (Object *obj = var) {
bool freed = false;
const Object *obj = var.get_validated_object_with_check(freed);
if (obj && !freed) {
if (Object::cast_to<GDScriptNativeClass>(obj)) {
continue;
}