diff --git a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs index a5dd37b5dc5..16beacb45c3 100644 --- a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs +++ b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs @@ -234,7 +234,7 @@ namespace GodotSharpTools.Build private static bool IsDebugMSBuildRequested() { - return Environment.GetEnvironmentVariable("GODOT_DEBUG_MSBUILD").Trim() == "1"; + return Environment.GetEnvironmentVariable("GODOT_DEBUG_MSBUILD")?.Trim() == "1"; } public void Dispose()