input: Fix crash when touchscreen generates out of screen coordinate
authorBryce Harrington <bryce@bryceharrington.org>
Tue, 2 Feb 2016 18:18:48 +0000 (10:18 -0800)
committerBryce Harrington <bryce@bryceharrington.org>
Tue, 2 Feb 2016 18:36:44 +0000 (10:36 -0800)
commit2c40d1d30eabe46706822a8b5c94579aeba58e84
tree64fdb767c337e4d0852b9f58093b7c5da6580cb6
parent4061e2b67e62d5d2a635f0b87098f331082e8145
input: Fix crash when touchscreen generates out of screen coordinate

With change 61ed7b6b, global touch coordinates are being passed to the
touch grab.  However, touch->grab is undefined in certain circumstances
such as when the touch screen raises an axis X value larger than the
maximum expected.  Move the check for this condition earlier, before our
first use of the pointer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92736

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
src/input.c