diff options
author | Chia-Hsiang Cheng <gary.chiahsiang.cheng@gmail.com> | 2023-08-04 22:38:43 +0800 |
---|---|---|
committer | Chia-Hsiang Cheng <gary.chiahsiang.cheng@gmail.com> | 2023-08-04 22:38:43 +0800 |
commit | 8da66412f6b3052aba0fd343cf4383ade3e93004 (patch) | |
tree | c0f824589ee474595d0db9037c4129814b26aaa7 /editor/debugger/editor_debugger_inspector.cpp | |
parent | eb4301b941fa211de204e37bd4d701f7e490a945 (diff) | |
download | redot-engine-8da66412f6b3052aba0fd343cf4383ade3e93004.tar.gz |
Avoid retrieving the object ID of a Nil variable
Diffstat (limited to 'editor/debugger/editor_debugger_inspector.cpp')
-rw-r--r-- | editor/debugger/editor_debugger_inspector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 1e9b7c2c60..b2fd84d2ed 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -232,7 +232,7 @@ void EditorDebuggerInspector::add_stack_variable(const Array &p_array) { PropertyHint h = PROPERTY_HINT_NONE; String hs; - if (var.var_type == Variant::OBJECT) { + if (var.var_type == Variant::OBJECT && v) { v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id(); h = PROPERTY_HINT_OBJECT_ID; hs = "Object"; |