mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-03-07 17:36:52 +08:00
fix: VersionNotFoundException
This commit is contained in:
parent
8997895a82
commit
8e9f706d37
@ -124,6 +124,14 @@ public class VersionPage extends Control implements DecoratorPage {
|
||||
}
|
||||
|
||||
public void loadVersion(String version, Profile profile) {
|
||||
// If we jumped to game list page and deleted this version
|
||||
// and back to this page, we should return to main page.
|
||||
if (!this.profile.getRepository().isLoaded() ||
|
||||
!this.profile.getRepository().hasVersion(version)) {
|
||||
Platform.runLater(() -> fireEvent(new PageCloseEvent()));
|
||||
return;
|
||||
}
|
||||
|
||||
setVersion(version, profile);
|
||||
preferredVersionName = version;
|
||||
listView.getSelectionModel().select(version);
|
||||
|
Loading…
Reference in New Issue
Block a user