Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

Commit a1d429a

Browse files
committed
Adds a null check for the render pass.
1 parent fbe31d7 commit a1d429a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Core/Components/Render/OrthographicRenderPass.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ public void Release() {
1616
}
1717

1818
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) {
19-
#if UNITY_EDITOR
20-
if (CommandBuffer == null) {
21-
return;
22-
}
23-
#endif
2419
using (new ProfilingScope(CommandBuffer, Sampler)) {
25-
context.ExecuteCommandBuffer(CommandBuffer);
20+
if (CommandBuffer != null) {
21+
context.ExecuteCommandBuffer(CommandBuffer);
22+
}
2623
}
2724
}
2825
}

0 commit comments

Comments
 (0)