File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ v0.3.28-git
15
15
+ Bug [#925]: Issues with reload of MHQ and Settings
16
16
+ [AtB] When failure to deploy results in defeat, replace generated entities with stubs.
17
17
+ Issue #40: [ATB] 3.25 : Enemy reinforcements incorrectly set to deploy at the start of the game
18
+ + Issue #68: IndexOutOfBoundsException when advancing day
18
19
19
20
v0.3.27 (2016-04-16 00:30 UTC)
20
21
+ Updated MegaMek.jar to 0.41.17
Original file line number Diff line number Diff line change @@ -6683,7 +6683,11 @@ protected ArrayList<Person> getSelectedUnassignedPatients() {
6683
6683
return patients ;
6684
6684
}
6685
6685
for (int idx : indices ) {
6686
- patients .add ((Person ) unassignedPatientModel .getElementAt (idx ));
6686
+ Person p = assignedPatientModel .getElementAt (idx );
6687
+ if (p == null ) {
6688
+ continue ;
6689
+ }
6690
+ patients .add (p );
6687
6691
}
6688
6692
return patients ;
6689
6693
}
@@ -6695,7 +6699,11 @@ protected ArrayList<Person> getSelectedAssignedPatients() {
6695
6699
return patients ;
6696
6700
}
6697
6701
for (int idx : indices ) {
6698
- patients .add ((Person ) assignedPatientModel .getElementAt (idx ));
6702
+ Person p = assignedPatientModel .getElementAt (idx );
6703
+ if (p == null ) {
6704
+ continue ;
6705
+ }
6706
+ patients .add (p );
6699
6707
}
6700
6708
return patients ;
6701
6709
}
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ public void setData(ArrayList<Person> data) {
35
35
36
36
@ Override
37
37
public Person getElementAt (int index ) {
38
+ if (index < 0 || index >= patients .size ()) {
39
+ return null ;
40
+ }
38
41
return patients .get (index );
39
42
}
40
43
You can’t perform that action at this time.
0 commit comments