diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameListPopupMenu.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameListPopupMenu.java index 703ef2f97a..fba5f72437 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameListPopupMenu.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameListPopupMenu.java @@ -53,7 +53,10 @@ public static void show(Node owner, JFXPopup.PopupVPosition vAlign, JFXPopup.Pop double initOffsetX, double initOffsetY, Profile profile, List versions) { GameListPopupMenu menu = new GameListPopupMenu(); - menu.getItems().setAll(versions.stream().map(it -> new GameItem(profile, it.getId())).toList()); + menu.getItems().setAll(versions.stream() + .filter(it -> profile.getRepository().hasVersion(it.getId())) + .map(it -> new GameItem(profile, it.getId())) + .toList()); JFXPopup popup = new JFXPopup(menu); popup.show(owner, vAlign, hAlign, initOffsetX, initOffsetY); }