dwm-noxz

[fork] suckless dwm - personal fork
git clone https://noxz.tech/git/dwm-noxz.git
dwm-noxz

commit: 20dfe7b29b934e8814f80174cc82a00b0d6638b0
parent: 1d77a497c3020e33b6bec85be1647c95d40ff70a
author: Chris Noxz <chris@noxz.tech>
date:   Fri, 2 Jun 2023 18:27:48 +0200
Prevent dwm from crashing on missing res_class
Mdwm.c3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dwm.c b/dwm.c
@@ -929,7 +929,8 @@ drawbar(Monitor *m)
 			if (!masterclientontag[i] && c->tags & (1 << i)) {
 				XClassHint ch = { NULL, NULL };
 				XGetClassHint(dpy, c->win, &ch);
-				masterclientontag[i] = ch.res_class;
+				if (!(masterclientontag[i] = ch.res_class))
+					continue;
 				/* to lower */
 				for(j = 0; masterclientontag[i][j]; j++)
 					masterclientontag[i][j] = tolower(masterclientontag[i][j]);