Commit 55ff20eb authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: fix dereference before null check



Found by Coverity.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent e3f47be9
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment