mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 11:25:46 -04:00
fix crash (#2124)
This commit is contained in:
parent
1454ea8358
commit
5fa066de6b
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.jackhuang.hmcl.ui.versions;
|
package org.jackhuang.hmcl.ui.versions;
|
||||||
|
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.property.ObjectProperty;
|
import javafx.beans.property.ObjectProperty;
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
@ -82,8 +83,8 @@ public class GameItem extends Control {
|
|||||||
ModpackConfiguration<?> config = profile.getRepository().readModpackConfiguration(version);
|
ModpackConfiguration<?> config = profile.getRepository().readModpackConfiguration(version);
|
||||||
if (config == null) return;
|
if (config == null) return;
|
||||||
tag.set(config.getVersion());
|
tag.set(config.getVersion());
|
||||||
} catch (IOException e) {
|
} catch (IOException | JsonParseException e) {
|
||||||
LOG.log(Level.WARNING, "Failed to read modpack configuration from ", e);
|
LOG.log(Level.WARNING, "Failed to read modpack configuration from " + version, e);
|
||||||
}
|
}
|
||||||
}, Platform::runLater)
|
}, Platform::runLater)
|
||||||
.exceptionally(handleUncaught);
|
.exceptionally(handleUncaught);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user