mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 14:00:03 +01:00
dix: fix dereference before null check
Found by Coverity.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 55ff20eb37)
This commit is contained in:
parent
b99a4ac32c
commit
b0e3696e01
1 changed files with 3 additions and 1 deletions
|
|
@ -160,11 +160,13 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id)
|
|||
int i;
|
||||
TouchClassPtr t = dev->touch;
|
||||
DDXTouchPointInfoPtr ti = NULL;
|
||||
Bool emulate_pointer = (t->mode == XIDirectTouch);
|
||||
Bool emulate_pointer;
|
||||
|
||||
if (!t)
|
||||
return NULL;
|
||||
|
||||
emulate_pointer = (t->mode == XIDirectTouch);
|
||||
|
||||
/* Look for another active touchpoint with the same DDX ID. DDX
|
||||
* touchpoints must be unique. */
|
||||
if (TouchFindByDDXID(dev, ddx_id, FALSE))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue