Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- Changes to v1: - only return if firstChannel is NULL
src/wcmCommon.c | 3 +++ src/wcmTouchFilter.c | 3 +++ 2 files changed, 6 insertions(+) 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..423a893 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -360,6 +360,9 @@ static void wcmSingleFingerPress(WacomDevicePtr priv) if (!TabletHasFeature(priv->common, WCM_LCD)) return; + if (!firstChannel) + return; + if (firstInProx && !secondInProx) { firstChannel->valid.states[0].buttons |= 1; common->wcmGestureMode = GESTURE_DRAG_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