mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 12:50:04 +01:00
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
1 changed files with 6 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue