Open mxlgv opened 1 year ago
Despite a null check later in the function, yutani_window_advertise_icon
is not intended to accept NULL
for the icon; clients should use yutani_window_advertise
instead. The bug lies in the SDL backend: TOARU_SetCaption
should be choosing yutani_window_advertise
if icon
is NULL
. I would transfer this issue to the SDL fork, but I don't seem to have issues enabled for that repository.
In that case, this if is redundant: https://github.com/klange/toaruos/blob/abe66fb45ba60c26a927023706e25de34493ed98/lib/yutani.c#L816
Yeah. Maybe it should support a NULL
icon... and it should probably also support a NULL
name, which it fails to do in the same way... :\
Will you fix it? In my opinion, the fix is quite obvious.
I've got a fix pending on the SDL side. Still thinking about what I want to do here. Falling back to the no-icon form is likely the right choice, though I am also thinking about what should be done in both functions if the title is NULL
- perhaps a signal to remove the window from the advertised window list.
Yutani doesn't check icon for
NULL
, probably causing applications to crash (Segmentation fault
) when setting the caption in SDL like this:https://github.com/klange/toaruos/blob/abe66fb45ba60c26a927023706e25de34493ed98/lib/yutani.c#L809