mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Merge pull request #89274 from 0x0ACB/unchecked_cast
Fix use after free in `GDScriptLanguage::debug_get_globals`
This commit is contained in:
commit
2a61a2fa2f
1 changed files with 3 additions and 1 deletions
|
|
@ -402,7 +402,9 @@ void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant>
|
||||||
}
|
}
|
||||||
|
|
||||||
const Variant &var = gl_array[E.value];
|
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)) {
|
if (Object::cast_to<GDScriptNativeClass>(obj)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue