summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-09-07 12:07:51 +0200
committerbakkeby <[email protected]>2020-09-07 12:07:51 +0200
commit018721ca762e11ea697bd52e8898485817f1d8fa (patch)
treea7848bfd78534710a9ea75276c0d682418aab1e2
parentf4f5ecab75916eb6d11333dcaaaa50de22f8db19 (diff)
downloaddwm-flexipatch-018721ca762e11ea697bd52e8898485817f1d8fa.tar.gz
dwm-flexipatch-018721ca762e11ea697bd52e8898485817f1d8fa.zip
systray may not exist when a clientmessage is received, resulting in dwm crash
-rw-r--r--dwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 05abd66..f6ffb77 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1076,7 +1076,7 @@ clientmessage(XEvent *e)
#endif // FOCUSONNETACTIVE_PATCH
#if BAR_SYSTRAY_PATCH
- if (showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) {
+ if (showsystray && systray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) {
/* add systray icons */
if (cme->data.l[1] == SYSTEM_TRAY_REQUEST_DOCK) {
if (!(c = (Client *)calloc(1, sizeof(Client))))