be more careful in IVAS
Don't walk off the end of a NULL pointer in InitValuatorAxisStruct.
This commit is contained in:
parent
7711c56d2e
commit
d32dc8bf19
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue