summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/synaptics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 30d79c5..1d32093 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -3128,7 +3128,9 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
priv->open_slots[j] = priv->open_slots[j + 1];
}
- priv->num_active_touches--;
+ BUG_WARN(priv->num_active_touches == 0);
+ if (priv->num_active_touches > 0)
+ priv->num_active_touches--;
}
}