Skip to content

Commit

Permalink
Fix settings panel bug NPE.
Browse files Browse the repository at this point in the history
The parent needs to be set before it can be used.
  • Loading branch information
tastybento committed Jan 11, 2024
1 parent be9b429 commit edd7bcf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ public class SettingsTab implements Tab, ClickHandler {
*/
public SettingsTab(User user, Type type) {
this.user = user;
this.island = parent.getIsland();
this.type = type;
this.world = island.getWorld();
// Island and world are set when the parent is set.
}

/**
Expand Down Expand Up @@ -234,6 +233,9 @@ public TabbedPanel getParentPanel() {
@Override
public void setParentPanel(TabbedPanel parent) {
this.parent = parent;
this.island = parent.getIsland();
this.world = island.getWorld();

}

}

0 comments on commit edd7bcf

Please sign in to comment.