tyoeer / Chaoshead

A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead
Apache License 2.0
4 stars 1 forks source link

Chaoshead crashes upon trying to deselect any element layer #124

Closed slothybutt closed 1 year ago

slothybutt commented 1 year ago

This seems to happen in any level, with any selection. This error log in particular is trying to deselect the background layer:

Error

levelEditor/details/selection.lua:142: attempt to index field 'background' (a nil value)

Traceback

[love "callbacks.lua"]:228: in function 'handler'
levelEditor/details/selection.lua:142: in function 'onReload'
ui/tools/details.lua:34: in function 'reload'
levelEditor/levelEditor.lua:184: in function 'removeSelectionLayer'
levelEditor/details/selection.lua:70: in function 'onClick'
ui/widgets/button.lua:144: in function 'onInputDeactivated'
ui/base/container.lua:140: in function 'inputDeactivated'
ui/base/container.lua:133: in function 'inputDeactivated'
ui/base/container.lua:133: in function 'inputDeactivated'
ui/base/container.lua:133: in function 'inputDeactivated'
...
ui/base/container.lua:133: in function 'inputDeactivated'
ui/base/container.lua:133: in function 'inputDeactivated'
main.lua:82: in function 'inputDeactivated'
chaoshead/input.lua:282: in function 'actionDeactivated'
chaoshead/input.lua:299: in function 'triggerDeactivation'
chaoshead/input.lua:214: in function 'mousereleased'
main.lua:104: in function <main.lua:103>
[love "callbacks.lua"]:154: in function <[love "callbacks.lua"]:144>
[C]: in function 'xpcall'
tyoeer commented 1 year ago

This has been fixed in https://github.com/tyoeer/Chaoshead/commit/180d26dc4219481095259da2431ef49e637b7a21