Skip to content

Commit

Permalink
Avoid retrieving the object ID of a Nil variable
Browse files Browse the repository at this point in the history
  • Loading branch information
garychia committed Aug 4, 2023
1 parent eb4301b commit 8da6641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/debugger/editor_debugger_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 8da6641

Please sign in to comment.