MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
131 stars 168 forks source link

[0.50.0 and on] Null Pointer Exception in TO&E when GM Removing COs #4953

Open WeaverThree opened 22 hours ago

WeaverThree commented 22 hours ago

Prerequisites and Pre-Issue Checklist

Severity *

Low (Minor/Nuisance): Minor glitches or cosmetic issues that don’t affect gameplay and occur rarely.

Brief Description *

Removing a lance CO via GM Mode Remove Person and then clicking on its company's entry in the TO&E causes a null pointer exception.

This occurs on 0.50.0 and today's nightly. It does not occur on 0.49.19.1.

Exception Text:

mekhq.MekHQ.lambda$main$1(MekHQ.java:294) - Uncaught Exception Detected
java.lang.NullPointerException: Cannot invoke "mekhq.campaign.personnel.Person.getFullTitle()" because the return value of "mekhq.campaign.Campaign.getPerson(java.util.UUID)" is null

Steps to Reproduce

  1. Create a new campaign. I used the full experience preset.
  2. Run the company generator, default settings.
  3. Look at the TO&E to see the CO of Baker Lance
  4. Go to the personnel tab
  5. GM Mode -> Remove the CO of Baker Lance
  6. Go back to TO&E and click on Able Company

Operating System *

Linux

Java Version *

17.0.12

MekHQ Suite Version *

v0.50.0

Custom MekHQ Version

No response

Attach Files

No response

Final Checklist

IllianiCBT commented 22 hours ago

Thanks for the report, but this has already been fixed in 50.01. :)

Closing as resolved

IllianiCBT commented 22 hours ago

Ignore me, I can't read. Re-opening.