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

Fix NPE with UnitHelp. #11977

Merged
merged 3 commits into from
Sep 21, 2023
Merged

Fix NPE with UnitHelp. #11977

merged 3 commits into from
Sep 21, 2023

Conversation

asvitkine
Copy link
Contributor

@asvitkine asvitkine commented Sep 20, 2023

Change Summary & Additional Notes

This fixes the NPE with Unit Help while preserving the functionality where the progress dialog stays shown until Unit Help is opened. (This is particularly noticeable on the Warcraft map where otherwise there's a 9s delay on my machine after the progress dialog is closed and before unit help is shown.)

The NPE was caused by my previous attempt at this doing Swing work on a background thread (which apparently worked fine on Mac, but not Windows). Instead, this PR reworks the logic with a more complicated solution that allows plumbing the expensive Swing work to be done to the background runner, so that it can run it before it closes the progress dialog.

Fixes #11973

Release Note

@asvitkine asvitkine merged commit 7ce78a8 into triplea-game:master Sep 21, 2023
1 check passed
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.

UnitHelpMenu#lambda$buildMenu$0:33 - java.lang.NullPointerException
1 participant