On Thu, Mar 12, 2015 at 06:08:12PM -0700, Jason Gerecke wrote: > On 3/12/2015 5:51 PM, Peter Hutterer wrote: > >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; > > > > Thanks :) > > I'm a little uncomfortable at the moment with patch 2 where you explicitly > ignore the return value, but for everything else in the set: > > Reviewed-by: Jason Gerecke <killert...@gmail.com>
sorry, missed this one and didn't push it before the release. I've pushed the full set, including patch 2 but feel free to revert it if you don't like it at all, I don't mind. it doesn't change the logic, we ignored the return value before, now it's just more explicit. Cheers, Peter ------------------------------------------------------------------------------ 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