diff options
| -rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/RegistrationWindowController.java | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/RegistrationWindowController.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/RegistrationWindowController.java index 152d3f0..0683c77 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/RegistrationWindowController.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/controller/RegistrationWindowController.java @@ -109,6 +109,9 @@ public class RegistrationWindowController {                  mouseEvent -> {                      if (mouseEvent.isPrimaryButtonDown() && mouseEvent.getClickCount() == 2) {                          chosenVehicle = tvVehicles.getSelectionModel().getSelectedItem(); +                        if (chosenVehicle == null) { +                            return; +                        }                          lVehicles.setText(chosenVehicle.name());                      }                  }); @@ -116,6 +119,9 @@ public class RegistrationWindowController {                  mouseEvent -> {                      if (mouseEvent.isPrimaryButtonDown() && mouseEvent.getClickCount() == 2) {                          chosenEmployees.add(tvEmployees.getSelectionModel().getSelectedItem()); +                        if (chosenEmployees == null) { +                            return; +                        }                          StringBuilder text = new StringBuilder();                          for (Employee employee : chosenEmployees) {                              text.append(employee.name()).append("\n");  | 
