diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallTypePage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallTypePage.java index 701db869d..2445e59a2 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallTypePage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallTypePage.java @@ -37,6 +37,8 @@ public final class InstallTypePage extends StackPane implements WizardPage { FXUtils.loadFXML(this, "/assets/fxml/download/dltype.fxml"); list.setOnMouseClicked(e -> { + if (list.getSelectionModel().getSelectedIndex() < 0) + return; controller.getSettings().put(INSTALL_TYPE, list.getSelectionModel().getSelectedIndex()); controller.onNext(); });