[Android] Fix the position of a logcat logging statement. If, for whatever reason, the event parameter is null, then the previous placement would have caused an exception.

This commit is contained in:
lioncash 2013-08-28 08:21:09 -04:00
parent 8ca3ed13de
commit d4840565a9
1 changed files with 2 additions and 1 deletions

View File

@ -128,10 +128,11 @@ public final class InputConfigFragment extends PreferenceFragment
{
public boolean onMotion(MotionEvent event)
{
Log.d("InputConfigFragment", "Received motion event: " + event.getAction());
if (event == null || (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0)
return false;
Log.d("InputConfigFragment", "Received motion event: " + event.getAction());
InputDevice input = event.getDevice();
List<InputDevice.MotionRange> motions = input.getMotionRanges();
if (firstEvent)