Skip to content

2022-July-06 - 2.6+4522c90

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Jul 03:20
4522c90
Fix NPE in ObjectivesPanel (#10839)

NPE happens trying to launch any game. Problem is that 'getName' is called before
the constructor in this class, in this case 'resourceLoader' is not yet initiatilized
and we then go on to have a NPE in 'ObjectiveProperties'

The override of 'getName' for a swing component is generally not necessary, this override
can be removed entirely and it fixes this problem. Though, we double-use the 'getName'
method to also allow for the name of the 'objectives' panel to be customized. To keep
this, we can instead just get the name of the objective panel and set the name of the
tab directly without doing the round-about override of 'getName'