[PATCH] dix: Don't let a driver without a ProximityClassRec post events

Jeremy Huddleston jeremyhu at apple.com
Thu Nov 3 01:38:23 PDT 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Nov 2, 2011, at 5:37 PM, Peter Hutterer wrote:

> We dereference dev->proximity for proximity events in UpdateDeviceState().
> Unconditionally, on the premise that a device that sends proximity events
> has a ProximityClassRec. Let that premise be true.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> dix/getevents.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index b1f0d86..7679417 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1513,7 +1513,7 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const Val
>     /* Sanity checks. */
>     if ((type != ProximityIn && type != ProximityOut) || !mask_in)
>         return 0;
> -    if (!pDev->valuator)
> +    if (!pDev->valuator || !pDev->proximity)
>         return 0;
> 
>     valuator_mask_copy(&mask, mask_in);
> -- 
> 1.7.7
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 





More information about the xorg-devel mailing list