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>

-- 
Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....

------------------------------------------------------------------------------
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

Reply via email to