diff options
author | okan <okan> | 2018-01-23 13:48:49 +0000 |
---|---|---|
committer | okan <okan> | 2018-01-23 13:48:49 +0000 |
commit | 8675b5e158aabf4be9be8289f3553d399474e42a (patch) | |
tree | febf6e171a97e5272326a9987801281358daae63 /group.c | |
parent | e99f1d4683eb348d5b8174212f7738d76039b32a (diff) | |
download | cwm-8675b5e158aabf4be9be8289f3553d399474e42a.tar.gz cwm-8675b5e158aabf4be9be8289f3553d399474e42a.tar.xz cwm-8675b5e158aabf4be9be8289f3553d399474e42a.zip |
If the requested group number is invalid, bail but don't kill cwm.
Diffstat (limited to 'group.c')
-rw-r--r-- | group.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |