Skip to content

Commit

Permalink
Fix failing User-Input inspection when no variable exists
Browse files Browse the repository at this point in the history
This will fix #61 where inspecting a User-Input in new projects
(i.e. auto-inspection by selection in absence of any variable) would cause crash.
  • Loading branch information
mhgolkar committed Mar 1, 2024
1 parent 3c61582 commit be8ce2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/user_input/inspector.gd
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func refresh_custom_properties_panel(_x = null) -> void:
field[0].set(field[1], field[2])
InputProperties.set_visible(show_panel)
# ...
if _OPEN_NODE.has("data") && _OPEN_NODE.data is Dictionary:
if variable_type != null && _OPEN_NODE.has("data") && _OPEN_NODE.data is Dictionary:
if _OPEN_NODE.data.has("variable") && _OPEN_NODE.data.variable == selected_var_id:
if _OPEN_NODE.data.has("custom") && _OPEN_NODE.data.custom is Array:
var custom_properties_size = _OPEN_NODE.data.custom.size()
Expand Down

0 comments on commit be8ce2f

Please sign in to comment.