systray may not always exist

This commit is contained in:
bakkeby
2020-09-07 12:43:37 +02:00
parent 018721ca76
commit 260bd11a53
2 changed files with 2 additions and 2 deletions

2
dwm.c
View File

@ -2160,7 +2160,7 @@ maprequest(XEvent *e)
#if BAR_SYSTRAY_PATCH
Client *i;
if (showsystray && (i = wintosystrayicon(ev->window))) {
if (showsystray && systray && (i = wintosystrayicon(ev->window))) {
sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION);
drawbarwin(systray->bar);
}