Skip to content

Commit

Permalink
Fix NullPointerException (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZekerZhayard authored Aug 10, 2024
1 parent 18d31be commit 3e4b06f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public static boolean isLanServer() {
}

public static String getCredential(GameProfile profile) {
return (profile == null || profile.hashCode() == 0) ? null :
(profile.getId() == null ? profile.getName() : String.format("%s-%s", profile.getName(), profile.getId()));
return profile == null ? null : String.format("%s-%s", profile.getName(), profile.getId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public ForgeTweaker() throws Exception {

@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile) {
if (gameDir == null) {
gameDir = new File(".");
}
LogManager.setLogFile(gameDir.toPath().resolve("CustomSkinLoader/CustomSkinLoader.log"));
}

Expand Down
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name=CustomSkinLoader
group=customskinloader
version=14.20
version=14.20.1

0 comments on commit 3e4b06f

Please sign in to comment.