about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mousefunc.c4
-rw-r--r--search.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 9813c5b..65efa35 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);
 		}
diff --git a/search.c b/search.c
index 2d5dd29..b1621f9 100644
--- a/search.c
+++ b/search.c
@@ -143,7 +143,7 @@ search_print_client(struct menu *mi, int list)
 		cc->matchname = cc->name;
 
 	(void)snprintf(mi->print, sizeof(mi->print), "(%d) %c%s",
-	    cc->group->shortcut, flag, cc->matchname);
+	    cc->group ? cc->group->shortcut : 0, flag, cc->matchname);
 
 	if (!list && cc->matchname != cc->name &&
 	    strlen(mi->print) < sizeof(mi->print) - 1) {