Skip to content

Commit 8455588

Browse files
committed
Fix "Could not find: 'null'" error
1 parent 725fcf7 commit 8455588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/airsquared/blobsaver/Controller.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -915,11 +915,11 @@ public void readInfo() {
915915
@SuppressWarnings("Duplicates")
916916
public void goButtonHandler() {
917917
boolean doReturn = false;
918-
if (!identifierCheckBox.isSelected() && "".equals(deviceTypeChoiceBox.getValue())) {
918+
if (!identifierCheckBox.isSelected() && (deviceTypeChoiceBox.getValue() == null || "".equals(deviceTypeChoiceBox.getValue()))) {
919919
deviceTypeChoiceBox.setEffect(errorBorder);
920920
doReturn = true;
921921
}
922-
if (!identifierCheckBox.isSelected() && "".equals(deviceModelChoiceBox.getValue())) {
922+
if (!identifierCheckBox.isSelected() && ("".equals(deviceModelChoiceBox.getValue()))) {
923923
deviceModelChoiceBox.setEffect(errorBorder);
924924
doReturn = true;
925925
}
@@ -957,7 +957,7 @@ private static boolean isTextFieldInvalid(CheckBox checkBox, TextField textField
957957
}
958958

959959
private static boolean isTextFieldInvalid(boolean isTextFieldRequired, TextField textField) {
960-
if (isTextFieldRequired && "".equals(textField.getText())) {
960+
if (isTextFieldRequired && (textField.getText() == null || "".equals(textField.getText()))) {
961961
textField.setEffect(errorBorder);
962962
return true;
963963
}

0 commit comments

Comments
 (0)