8000 Issue #6790: Prevent NPE from C3 when Refitting by psikomonkie · Pull Request #6808 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue #6790: Prevent NPE from C3 when Refitting #6808

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

psikomonkie
Copy link
Collaborator

Fixes #6790
Fixes #6791

Regarding the change to Campaign::reloadGameEntities: This prevents addEntity from generating a GameEntityNewEvent and setting the initial BV. This is unnecessary as these units were already added to the game and we're just reloading them. This includes when returning from scenarios, the other place reloadGameEntities is used.

When calculating the BV of C3 it will clear C3 connections if they aren't valid, so this prevents networks from being broken as the entities are re-added to the game.

@psikomonkie psikomonkie changed the title Issue #6790: Prevent NPE from C3 Issue #6790: Prevent NPE from C3 when Refitting Apr 28, 2025
Copy link
Collaborator
@IllianiBird IllianiBird left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 11.46%. Comparing base (10985a2) to head (716addf).
Report is 50 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6808   +/-   ##
=========================================
  Coverage     11.45%   11.46%           
+ Complexity     6506     6501    -5     
=========================================
  Files          1098     1098           
  Lines        140875   140807   -68     
  Branches      21845    21829   -16     
=========================================
- Hits          16144    16137    -7     
+ Misses       123057   123000   -57     
+ Partials       1674     1670    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Scoppio Scoppio merged commit 4ed2ea3 into MegaMek:master May 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Uncaught Java Exception when traveling to planet Custom Meklab Error
3 participants
0