JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
hotfix of a serious crashing bug
[dwm.git] / view.c
diff --git a/view.c b/view.c
index 14cfc1d..baa2ac6 100644 (file)
--- a/view.c
+++ b/view.c
@@ -234,7 +234,8 @@ view(Arg *arg) {
 
        for(i = 0; i < ntags; i++)
                seltag[i] = (arg->i == -1) ? True : False;
-       seltag[arg->i] = True;
+       if(arg->i >= 0 && arg->i < ntags)
+               seltag[arg->i] = True;
        arrange();
 }