flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
293 stars 25 forks source link

Tree crash fix #145

Closed pakeke-constructor closed 1 year ago

pakeke-constructor commented 1 year ago

In the SlabTest menu, there is a crash with the Tree:

Error

/Internal/UI/Tree.lua:220: attempt to index global 'ExpandIconOptions' (a nil value)

Traceback

[love "callbacks.lua"]:239: in function 'handler'
/Internal/UI/Tree.lua:220: in function 'BeginTree'
SlabTest.lua:1098: in function <SlabTest.lua:1044>
SlabTest.lua:2532: in function 'Begin'
main.lua:40: in function 'update'
[love "callbacks.lua"]:174: in function <[love "callbacks.lua"]:156>
[C]: in function 'xpcall'

The cause of the crash is an out of bound local. This PR fixes that crash