In the debugger, this->elements[x] is not NULL (so it makes sense that it makes it through the above if condition, and probably isn't a race condition), but it still appears to be erroring when trying to invoke process.
It's also worth noting that every time the "Adjust Sort" button is pressed, about 0.2 MB of memory leaks, so some other assumption when sorting is probably also bugged.
If you spam the "Adjust Sort" button (on any platform– PC, Switch, or Wii U) it will eventually crash.
It stops at the following line with a segfault: https://github.com/vgmoose/hb-appstore/blob/master/gui/Element.cpp#L20 (at x=0)
In the debugger,
this->elements[x]
is not NULL (so it makes sense that it makes it through the aboveif
condition, and probably isn't a race condition), but it still appears to be erroring when trying to invokeprocess
.It's also worth noting that every time the "Adjust Sort" button is pressed, about 0.2 MB of memory leaks, so some other assumption when sorting is probably also bugged.