natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
260 stars 83 forks source link

Issue #30 and #29, and a suggestion for ease of use. #31

Closed jon-dez closed 4 years ago

jon-dez commented 4 years ago

I found two bugs (and fixed them of course), one where a program could segfault when a SideBar has no child and where a Tabframe will not switch to any view after it has encountered one view that is a nullptr. I also modified the constructor of brls::Button to default construct a PLAIN button for ease of use.

jon-dez commented 4 years ago

No problem! Just to clarify, the segfault/crash happened on the SideBar when there were no elements in the vector of children. If the TabBarItem had no view (a nullptr) there was no crash, but it prevented a TabBarItem with a view (not nullptr) from switching if the view it was switching from was nullptr.