Skip to content

Commit 452bd59

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.3] Fix NRE in CustomPass editor when DRS is enabled
1 parent 571e6cf commit 452bd59

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass

Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ internal TargetBuffer getConstrainedDepthBuffer()
5858
{
5959
TargetBuffer depth = targetDepthBuffer;
6060
if (depth == TargetBuffer.Camera &&
61+
HDRenderPipeline.currentAsset != null &&
6162
HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings.enabled &&
62-
currentHDCamera.allowDynamicResolution &&
63+
currentHDCamera != null && currentHDCamera.allowDynamicResolution &&
6364
injectionPoint == CustomPassInjectionPoint.AfterPostProcess)
6465
{
6566
// This custom pass is injected after postprocessing, and Dynamic Resolution Scaling is enabled, which

0 commit comments

Comments
 (0)