fixed a nullpointer exception when creating a new team
authorXeli
Mon, 20 Feb 2012 21:50:56 +0100
changeset 6726 31582be2ddbc
parent 6725 f5eb11306c6a
child 6727 b3160a49f02e
fixed a nullpointer exception when creating a new team
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java	Mon Feb 20 21:22:21 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamCreatorActivity.java	Mon Feb 20 21:50:56 2012 +0100
@@ -179,10 +179,10 @@
 				((SimpleAdapter)hogHat.get(0).getAdapter()).notifyDataSetChanged();
 				
 				copy(voicesData, voicesDataNew);
-				((ArrayAdapter<String>)fort.getAdapter()).notifyDataSetChanged();
+				((ArrayAdapter<String>)voice.getAdapter()).notifyDataSetChanged();
 				
 				copy(fortsData, fortsDataNew);
-				((ArrayAdapter<String>)voice.getAdapter()).notifyDataSetChanged();			
+				((ArrayAdapter<String>)fort.getAdapter()).notifyDataSetChanged();			
 			}
 		});		
 
@@ -283,7 +283,6 @@
 	};
 
 	private OnItemSelectedListener fortSelector = new OnItemSelectedListener() {
-		@SuppressWarnings("unchecked")
 		public void onItemSelected(AdapterView<?> arg0, View arg1,
 				int position, long arg3) {
 			settingsChanged = true;