Skip to content

Commit

Permalink
don't attempt to get _union field of non-userdata
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 4, 2024
1 parent 54267e7 commit 4564717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/gm-editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ function GmEditorUi:updateTarget(preserve_pos,reindex)
end
end
end
self.subviews.lbl_current_item:itemById('union').text = trg.target._type._union and " [union structure]" or ""
self.subviews.lbl_current_item:itemById('union').text = type(trg.target) == 'userdata' and trg.target._type._union and " [union structure]" or ""
self.subviews.lbl_current_item:itemById('name').text=tostring(trg.target)
local t={}
for k,v in pairs(trg.keys) do
Expand Down

0 comments on commit 4564717

Please sign in to comment.