From 16dae42baa69583f51224e7eda784a0e1680d7be Mon Sep 17 00:00:00 2001 From: YangSpring <99802662+YangSpring114@users.noreply.github.com> Date: Sun, 22 Sep 2024 17:17:49 +0800 Subject: [PATCH] up --- .../Components/Resolver/Arguments/GameArgumentResolver.cs | 2 +- .../Components/Resolver/Arguments/JvmArgumentResolver.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MinecraftLaunch/Components/Resolver/Arguments/GameArgumentResolver.cs b/MinecraftLaunch/Components/Resolver/Arguments/GameArgumentResolver.cs index 6feca7f..d39d914 100644 --- a/MinecraftLaunch/Components/Resolver/Arguments/GameArgumentResolver.cs +++ b/MinecraftLaunch/Components/Resolver/Arguments/GameArgumentResolver.cs @@ -20,7 +20,7 @@ public static IEnumerable Resolve(GameJsonEntry gameJsonEntry) { } } - if (gameJsonEntry.Arguments.Game is null) { + if (gameJsonEntry?.Arguments?.Game is null) { yield break; } diff --git a/MinecraftLaunch/Components/Resolver/Arguments/JvmArgumentResolver.cs b/MinecraftLaunch/Components/Resolver/Arguments/JvmArgumentResolver.cs index d045f00..31b5b74 100644 --- a/MinecraftLaunch/Components/Resolver/Arguments/JvmArgumentResolver.cs +++ b/MinecraftLaunch/Components/Resolver/Arguments/JvmArgumentResolver.cs @@ -12,7 +12,7 @@ internal sealed class JvmArgumentResolver { public static IEnumerable Resolve(GameJsonEntry gameJsonEntry) { var jvm = new List(); - if (gameJsonEntry.Arguments.Jvm is null) { + if (gameJsonEntry?.Arguments?.Jvm is null) { yield return "-Djava.library.path=${natives_directory}"; yield return "-Dminecraft.launcher.brand=${launcher_name}"; yield return "-Dminecraft.launcher.version=${launcher_version}";