From 8da66412f6b3052aba0fd343cf4383ade3e93004 Mon Sep 17 00:00:00 2001 From: Chia-Hsiang Cheng Date: Fri, 4 Aug 2023 22:38:43 +0800 Subject: [PATCH] Avoid retrieving the object ID of a Nil variable --- editor/debugger/editor_debugger_inspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 1e9b7c2c609..b2fd84d2edd 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(v)->get_object_id(); h = PROPERTY_HINT_OBJECT_ID; hs = "Object";