Browse Source

Fixed nullref when Destroy gets called repeatedly

master
Nico de Poel 2 years ago
parent
commit
9dade33e17
  1. 3
      com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR3/Fsr3UpscalerContext.cs

3
com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Upscalers/FSR3/Fsr3UpscalerContext.cs

@ -125,9 +125,12 @@ namespace FidelityFX
DestroyConstantBuffer(ref _spdConstantsBuffer); DestroyConstantBuffer(ref _spdConstantsBuffer);
DestroyConstantBuffer(ref _upscalerConstantsBuffer); DestroyConstantBuffer(ref _upscalerConstantsBuffer);
if (_commandBuffer != null)
{
_commandBuffer.Dispose(); _commandBuffer.Dispose();
_commandBuffer = null; _commandBuffer = null;
} }
}
public void Dispatch(Fsr3Upscaler.DispatchDescription dispatchParams) public void Dispatch(Fsr3Upscaler.DispatchDescription dispatchParams)
{ {

Loading…
Cancel
Save