diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-07-20 18:40:47 -0400 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-07-21 15:19:54 -0400 |
commit | d32dc8bf19e1071fc30af2f0bc6a6699b351f39e (patch) | |
tree | b3925766d16fbb75f3d123a5e6dec1f0178c59ad /Xi | |
parent | 7711c56d2e2aeae4dcd6d9297bc144c1cb3cfab1 (diff) |
be more careful in IVAS
Don't walk off the end of a NULL pointer in InitValuatorAxisStruct.
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 2932ab2d2..9fdea6d9c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -302,7 +302,12 @@ _X_EXPORT void InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { - register AxisInfoPtr ax = dev->valuator->axes + axnum; + register AxisInfoPtr ax; + + if (!dev || !dev->valuator) + return NULL; + + ax = dev->valuator->axes + axnum; ax->min_value = minval; ax->max_value = maxval; |