Fixed NullpointerException in GpodnetAuthenticationActivity

This commit is contained in:
daniel oeh 2014-08-12 16:39:10 +02:00
parent b0500e7048
commit 57c70871b6
1 changed files with 4 additions and 2 deletions

View File

@ -270,8 +270,10 @@ public class GpodnetAuthenticationActivity extends ActionBarActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
final int position = spinnerDevices.getSelectedItemPosition(); final int position = spinnerDevices.getSelectedItemPosition();
selectedDevice = devices.get().get(position); if (position != AdapterView.INVALID_POSITION) {
advance(); selectedDevice = devices.get().get(position);
advance();
}
} }
}); });
} }