summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2013-12-08 13:51:38 +0000
committerokan <okan>2013-12-08 13:51:38 +0000
commit7fad5224d47aba47d4fe02d2ce2b20e058bdedc0 (patch)
treeaddb8650c8eb8acf21c02fed8c6231e321051121 /mousefunc.c
parent5dc65d9242c423fd4f45ec48c32e525d9f1300f2 (diff)
downloadcwm-7fad5224d47aba47d4fe02d2ce2b20e058bdedc0.tar.gz
cwm-7fad5224d47aba47d4fe02d2ce2b20e058bdedc0.tar.xz
cwm-7fad5224d47aba47d4fe02d2ce2b20e058bdedc0.zip
If not using sticky mode (the default), clients aren't automagically cn-bisectgtkbug
assigned a group, thus cc->group will be NULL - fix the client group
shortcut in menu lists; crash reported by Christian Neukirchen.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 05cdfe2..f465802 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -231,8 +231,8 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
 				continue;
 
 			mi = xcalloc(1, sizeof(*mi));
-			(void)snprintf(mi->text, sizeof(mi->text),
-			    "(%d) %s", cc->group->shortcut, wname);
+			(void)snprintf(mi->text, sizeof(mi->text), "(%d) %s",
+			    cc->group ? cc->group->shortcut : 0, wname);
 			mi->ctx = cc;
 			TAILQ_INSERT_TAIL(&menuq, mi, entry);
 		}