Skip to content

Commit b270818

Browse files
elliomanEvergreen
authored andcommitted
[2023.3][URP] Fixing a NullReferenceException when logging an error in Server Builds (UUM-56965)
When running server builds calling `{GetType().DeclaringType.Name}` will give a NullReferenceException. This happens in two places inside the URP Codebase. To fix this the calls are simply removed as they don't provide much value.
1 parent 5a94418 commit b270818

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/Passes/ColorGradingLutPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Material Load(Shader shader)
3737
{
3838
if (shader == null)
3939
{
40-
Debug.LogError($"Missing shader. {GetType().DeclaringType.Name} render pass will not execute. Check for missing reference in the renderer resources.");
40+
Debug.LogError($"Missing shader. ColorGradingLutPass render pass will not execute. Check for missing reference in the renderer resources.");
4141
return null;
4242
}
4343

Packages/com.unity.render-pipelines.universal/Runtime/Passes/PostProcessPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ Material Load(Shader shader)
18531853
{
18541854
if (shader == null)
18551855
{
1856-
Debug.LogErrorFormat($"Missing shader. {GetType().DeclaringType.Name} render pass will not execute. Check for missing reference in the renderer resources.");
1856+
Debug.LogErrorFormat($"Missing shader. PostProcessing render passes will not execute. Check for missing reference in the renderer resources.");
18571857
return null;
18581858
}
18591859
else if (!shader.isSupported)

0 commit comments

Comments
 (0)