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>
This commit is contained in:
parent
e3f47be9fb
commit
55ff20eb37
|
@ -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…
Reference in New Issue
Block a user