Parcourir la source

applied fix of toggletag by Jan Kaliszewski

Premysl Hruby il y a 17 ans
Parent
commit
0f26de991f
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      dwm.c

+ 5 - 1
dwm.c

@@ -1469,8 +1469,12 @@ togglefloating(const Arg *arg) {
 
 void
 toggletag(const Arg *arg) {
-	unsigned int mask = sel->tags ^ (arg->ui & TAGMASK);
+	unsigned int mask;
 
+	if (!sel)
+		return;
+	
+	mask = sel->tags ^ (arg->ui & TAGMASK);
 	if(sel && mask) {
 		sel->tags = mask;
 		arrange();