Skip to content

Commit

Permalink
Check for null to revise #297
Browse files Browse the repository at this point in the history
  • Loading branch information
phrack committed Nov 22, 2015
1 parent fc9d779 commit ffea550
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/com/shootoff/camera/CameraManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ private void showMissingCameraError() {
cameraAlert.setHeaderText("Cannot Communicate with Camera!");
cameraAlert.setResizable(true);
cameraAlert.setContentText(message);
cameraAlert.initOwner(controller.getStage());
if (controller != null) cameraAlert.initOwner(controller.getStage());
cameraAlert.show();
});
}
Expand All @@ -623,7 +623,7 @@ private void showFPSWarning(double fps) {
cameraAlert.setHeaderText("Webcam FPS is too low!");
cameraAlert.setResizable(true);
cameraAlert.setContentText(message);
cameraAlert.initOwner(controller.getStage());
if (controller != null) cameraAlert.initOwner(controller.getStage());
cameraAlert.show();
});
}
Expand Down Expand Up @@ -686,7 +686,7 @@ public void run() {
brightnessAlert.setHeaderText("Webcam detected very bright conditions!");
brightnessAlert.setResizable(true);
brightnessAlert.setContentText(message);
brightnessAlert.initOwner(controller.getStage());
if (controller != null) brightnessAlert.initOwner(controller.getStage());
brightnessAlert.show();
});
}
Expand Down Expand Up @@ -737,6 +737,4 @@ public void disableAutoCalibration() {
public void setController(ShootOFFController controller) {
this.controller = controller;
}


}

0 comments on commit ffea550

Please sign in to comment.