[PATCH] xinput: Check for NULL argument in XInputGetState