x11_backend: guard x11_clip_icon_paint against NULL icon

Clip icon paint is called during dock creation before the icon
is fully initialized. Guard against NULL dereference.
This commit is contained in:
Levi Neely 2026-05-14 19:59:20 +02:00
parent 509a59ec81
commit ca06f1c847
1 changed files with 4 additions and 0 deletions

View File

@ -3907,7 +3907,11 @@ static void x11_icon_select(WIcon *icon) { wIconSelect(icon); }
static void x11_icon_change_title(WIcon *icon, WWindow *wwin) { wIconChangeTitle(icon, wwin); }
static void x11_clip_icon_paint(WAppIcon *aicon)
{
if (!aicon || !aicon->icon || !aicon->icon->core)
return;
WScreen *scr = aicon->icon->core->screen_ptr;
if (!scr->workspaces || !scr->workspaces[scr->current_workspace])
return;
WWorkspace *workspace = scr->workspaces[scr->current_workspace];
WMColor *color;
Window win = aicon->icon->core->window;