summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 0bb551e..cc08787 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2451,7 +2451,7 @@ urgent(struct wl_listener *listener, void *data)
void
view(const Arg *arg)
{
- if (selmon && (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
+ if (!selmon || (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
selmon->seltags ^= 1; /* toggle sel tagset */
if (arg->ui & TAGMASK)