summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2015-06-28 19:50:46 +0000
committerokan <okan>2015-06-28 19:50:46 +0000
commit17720de4abd818ec04447f255e3d670ed2929911 (patch)
tree869aea4c66d55dd1480922d340a77b7c48b5f932 /group.c
parent18f63629fdb322e2bd9d39972bf28c3bc96d0942 (diff)
downloadcwm-17720de4abd818ec04447f255e3d670ed2929911.tar.gz
cwm-17720de4abd818ec04447f255e3d670ed2929911.tar.xz
cwm-17720de4abd818ec04447f255e3d670ed2929911.zip
replace assert usage
Diffstat (limited to 'group.c')
-rw-r--r--group.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/group.c b/group.c
index 7ab65f9..1bf2fd7 100644
--- a/group.c
+++ b/group.c
@@ -22,7 +22,6 @@
 #include <sys/types.h>
 #include <sys/queue.h>
 
-#include <assert.h>
 #include <err.h>
 #include <errno.h>
 #include <limits.h>
@@ -264,9 +263,9 @@ group_cycle(struct screen_ctx *sc, int flags)
 {
 	struct group_ctx	*gc, *showgroup = NULL;
 
-	assert(sc->group_active != NULL);
+	if (((gc = sc->group_active)) == NULL)
+		errx(1, "group_cycle: no active group");
 
-	gc = sc->group_active;
 	for (;;) {
 		gc = (flags & CWM_RCYCLE) ? TAILQ_PREV(gc, group_ctx_q,
 		    entry) : TAILQ_NEXT(gc, entry);