Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- src/wcmCommon.c | 3 +++ src/wcmTouchFilter.c | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 7d56ba5..92f8cf8 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1475,6 +1475,9 @@ void wcmFreeCommon(WacomCommonPtr *ptr) { WacomCommonPtr common = *ptr; + if (!common) + return; + DBG(10, common, "common refcount dec to %d\n", common->refcnt - 1); if (--common->refcnt == 0) { diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c index 61e3a3a..ae367a7 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -360,11 +360,13 @@ static void wcmSingleFingerPress(WacomDevicePtr priv) if (!TabletHasFeature(priv->common, WCM_LCD)) return; - if (firstInProx && !secondInProx) { + if (!firstInProx) + return; + + if (!secondInProx) { firstChannel->valid.states[0].buttons |= 1; common->wcmGestureMode = GESTURE_DRAG_MODE; - } - else { + } else { firstChannel->valid.states[0].buttons &= ~1; common->wcmGestureMode = GESTURE_NONE_MODE; } -- 2.1.0 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel