summaryrefslogtreecommitdiffhomepage
path: root/patch/dragcfact.c
diff options
context:
space:
mode:
Diffstat (limited to 'patch/dragcfact.c')
-rw-r--r--patch/dragcfact.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/patch/dragcfact.c b/patch/dragcfact.c
index 98e2e31..9d20a2b 100644
--- a/patch/dragcfact.c
+++ b/patch/dragcfact.c
@@ -57,7 +57,8 @@ dragcfact(const Arg *arg)
fact = (float) -4.0 * dist_y / c->mon->wh;
}
- setcfact(&((Arg) { .f = fact }));
+ if (fact)
+ setcfact(&((Arg) { .f = fact }));
prev_x = ev.xmotion.x;
prev_y = ev.xmotion.y;