From d8d955224d43194ee7bc705d3535ae9ce03f3f34 Mon Sep 17 00:00:00 2001 From: ZekerZhayard Date: Sun, 7 May 2023 16:38:36 +0800 Subject: [PATCH] Fix crash when the URL of skull profiles is not valid. (#255) * Fix crash when the URL of skull profiles is not valid. * Fix crash when the URL of skull profiles is not valid. --- .../customskinloader/fake/FakeMinecraftProfileTexture.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/customskinloader/fake/FakeMinecraftProfileTexture.java b/Common/src/main/java/customskinloader/fake/FakeMinecraftProfileTexture.java index 517f5be..de8fbb5 100644 --- a/Common/src/main/java/customskinloader/fake/FakeMinecraftProfileTexture.java +++ b/Common/src/main/java/customskinloader/fake/FakeMinecraftProfileTexture.java @@ -2,6 +2,7 @@ package customskinloader.fake; import java.io.File; import java.util.Map; +import java.util.Optional; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import customskinloader.utils.HttpTextureUtil; @@ -35,7 +36,7 @@ public class FakeMinecraftProfileTexture extends MinecraftProfileTexture { @Override public String getHash() { - return this.info.hash; + return this.info.hash == null ? super.getHash() : this.info.hash; } public File getCacheFile() {