Check list pointer returned by XListInputDevices, as it may be null in VNC session, while XListInputDevices indicates positive number of devices. This would crash unity-2d-shell.. Fixes: https://bugs.launchpad.net/bugs/965464. Approved by Albert Astals Cid.