Commit fb50aa8
committed
Fix NPE when spending XP on new skills (Fixes #8707)
Root Cause
When spending XP to acquire a new skill, getSkill() returns null before the skill exists. After improveSkill() creates
the skill, the local skill variable was never updated, causing a NullPointerException when accessing skill.getType()
and skill.getLevel().
Changes
1. PersonnelTableMouseAdapter.java - Re-fetch the skill after improveSkill() creates it
Files Changed
- MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java - Added skill re-fetch after creation1 parent 042d993 commit fb50aa8
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
0 commit comments