Skip to content

Commit be82031

Browse files
author
Jan Schraff
committed
fixed npe on popup change with time
1 parent be83874 commit be82031

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/main/java/de/doubleslash/keeptime/viewpopup/ViewControllerPopup.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public class ViewControllerPopup {
6161
private ProjectsListViewController projectsListViewController;
6262

6363
@Autowired
64-
public ViewControllerPopup(final Model model, final Controller contropller) {
64+
public ViewControllerPopup(final Model model, final Controller controller) {
6565
this.model = model;
66-
this.controller = contropller;
66+
this.controller = controller;
6767
}
6868

6969
public void setStage(final Stage primaryStage) {
@@ -75,6 +75,12 @@ public void setStage(final Stage primaryStage) {
7575
hide();
7676
}
7777
});
78+
79+
projectsListViewController = new ProjectsListViewController(model, controller, stage, projectListView,
80+
searchTextField, true);
81+
82+
Interval.registerCallBack(() -> projectsListViewController.tick());
83+
7884
}
7985

8086
public void show(final Point mouseLocation) {
@@ -105,10 +111,6 @@ private void initialize() {
105111
}
106112
});
107113

108-
Interval.registerCallBack(() -> projectsListViewController.tick());
109-
110-
projectsListViewController = new ProjectsListViewController(model, controller, stage, projectListView,
111-
searchTextField, true);
112114
projectListView.setFixedCellSize(13);
113115

114116
final Runnable updateMainBackgroundColor = this::runUpdateMainBackgroundColor;

0 commit comments

Comments
 (0)