Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4021: Preventing Save Game Loading Player Name NPE #4023

Merged
merged 7 commits into from
Dec 13, 2022

Conversation

Windchild292
Copy link
Contributor

@Windchild292 Windchild292 commented Dec 5, 2022

This fixes #4021. The first commit is cleanup while investigating the issue, the second commit is the actual fix.

I used manual XML parsing as we only need a few pieces to load in, and this prevents weird loading errors. It also now parses the version correctly if the file cannot load, which improves that handling too and prevents some other file load issues.

@Windchild292 Windchild292 self-assigned this Dec 5, 2022
@Windchild292 Windchild292 changed the title 4201: Preventing Save Game Loading Player Name NPE 4021: Preventing Save Game Loading Player Name NPE Dec 5, 2022
@@ -1635,8 +1624,7 @@
return nDamage;
}

protected void handleIgnitionDamage(Vector<Report> vPhaseReport,
Building bldg, int hits) {
protected void handleIgnitionDamage(Vector<Report> vPhaseReport, Building bldg, int hits) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'bldg' is never used.
@@ -1635,8 +1624,7 @@
return nDamage;
}

protected void handleIgnitionDamage(Vector<Report> vPhaseReport,
Building bldg, int hits) {
protected void handleIgnitionDamage(Vector<Report> vPhaseReport, Building bldg, int hits) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'hits' is never used.
@lgtm-com
Copy link

lgtm-com bot commented Dec 5, 2022

This pull request fixes 1 alert when merging 3a7e1a2 into 2ffa6f1 - view on LGTM.com

fixed alerts:

  • 1 for Dereferenced variable may be null

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@lgtm-com
Copy link

lgtm-com bot commented Dec 8, 2022

This pull request fixes 1 alert when merging 68ef5e5 into c7e87ed - view on LGTM.com

fixed alerts:

  • 1 for Dereferenced variable may be null

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

Copy link
Member

@SJuliez SJuliez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK as far as I can say; I have two questions or comments.

megamek/src/megamek/client/ui/swing/MegaMekGUI.java Outdated Show resolved Hide resolved
@Windchild292 Windchild292 merged commit 3a6163c into MegaMek:master Dec 13, 2022
@Windchild292 Windchild292 deleted the dev_Windchild_4021 branch December 13, 2022 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE while loading a save-file
2 participants