From 57c70871b6c9b68e5c82b0b3472102c4f8ccb2ea Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Tue, 12 Aug 2014 16:39:10 +0200 Subject: Fixed NullpointerException in GpodnetAuthenticationActivity --- .../activity/gpoddernet/GpodnetAuthenticationActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/de/danoeh') diff --git a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java index cb6dc41cf..6a60f65fe 100644 --- a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java +++ b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java @@ -270,8 +270,10 @@ public class GpodnetAuthenticationActivity extends ActionBarActivity { @Override public void onClick(View v) { final int position = spinnerDevices.getSelectedItemPosition(); - selectedDevice = devices.get().get(position); - advance(); + if (position != AdapterView.INVALID_POSITION) { + selectedDevice = devices.get().get(position); + advance(); + } } }); } -- cgit v1.2.3