mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
If the requested group number is invalid, bail but don't kill cwm.
This commit is contained in:
parent
e99f1d4683
commit
8675b5e158
6
group.c
6
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)
|
||||
|
Loading…
Reference in New Issue
Block a user