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

Add missing null check to duplicated code #6801

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

DanVanAtta
Copy link
Member

'startTerritory' can be null. On line 392 there
is a null check for 'startTerritory' (copy/pasted
code), but we do not have the same on line 339 where
we can get a NPE.

Addresses NPE reported in:
#6789

Functional Changes

[] New map or map update
[] New Feature
[] Feature update or enhancement
[] Feature Removal
[] Code Cleanup or refactor
[] Configuration Change
[x] Problem fix
[] Other:

Testing

Screens Shots

Additional Notes to Reviewer

Release Note

FIX|Fix NPE possible when AI is evaluating naval bombardment

'startTerritory' can be null. On line 392 there
is a null check for 'startTerritory' (copy/pasted
code), but we do not have the same on line 339 where
we can get a NPE.

Addresses NPE reported in:
#6789
@DanVanAtta DanVanAtta merged commit eba8f52 into master Jun 24, 2020
@DanVanAtta DanVanAtta deleted the fix-dupe-code-missing-null-check branch June 24, 2020 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant