If you exit Play Mode while the SlightBlur custom pass is active, you get a bunch of errors as the frame isn't released properly.
I noticed that in the Cleanup method the maskDepthBuffer.Release() wasn't checking that maskDepthBuffer wasn't null, and changing it to maskDepthBuffer?.Release() fixed the problem.
If you exit Play Mode while the SlightBlur custom pass is active, you get a bunch of errors as the frame isn't released properly.
I noticed that in the Cleanup method the maskDepthBuffer.Release() wasn't checking that maskDepthBuffer wasn't null, and changing it to maskDepthBuffer?.Release() fixed the problem.