From 8675b5e158aabf4be9be8289f3553d399474e42a Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 23 Jan 2018 13:48:49 +0000 Subject: If the requested group number is invalid, bail but don't kill cwm. --- group.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'group.c') diff --git a/group.c b/group.c index 10a6bfb..4c25bcc 100644 --- a/group.c +++ b/group.c @@ -155,7 +155,7 @@ group_movetogroup(struct client_ctx *cc, int idx) struct group_ctx *gc; if (idx < 0 || idx >= Conf.ngroups) - errx(1, "%s: index out of range (%d)", __func__, idx); + return; TAILQ_FOREACH(gc, &sc->groupq, entry) { if (gc->num == idx) @@ -216,7 +216,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx) struct group_ctx *gc; if (idx < 0 || idx >= Conf.ngroups) - errx(1, "%s: index out of range (%d)", __func__, idx); + return; TAILQ_FOREACH(gc, &sc->groupq, entry) { if (gc->num == idx) @@ -239,7 +239,7 @@ group_only(struct screen_ctx *sc, int idx) struct group_ctx *gc; if (idx < 0 || idx >= Conf.ngroups) - errx(1, "%s: index out of range (%d)", __func__, idx); + return; TAILQ_FOREACH(gc, &sc->groupq, entry) { if (gc->num == idx) -- cgit 1.4.1