diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 64645843a27..ccb64514a79 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -530,6 +530,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed compile error with XR SubsystemManager. - Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) - Fixed culling of planar reflection probes that change position (case 1218651) +- Fixed null reference when processing lightprobe (case 1235285) ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 205196ec98d..8a0bc5fa808 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -2506,17 +2506,17 @@ int PreprocessVisibleProbes(HDCamera hdCamera, CullingResults cullResults, HDPro { var probe = cullResults.visibleReflectionProbes[probeIndex]; + if (probe.reflectionProbe == null + || probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled + || !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject)) + continue; + ref ProcessedProbeData processedData = ref m_ProcessedReflectionProbeData[probeIndex]; PreprocessReflectionProbeData(ref processedData, probe, hdCamera); if (TrivialRejectProbe(processedData, hdCamera)) continue; - if (probe.reflectionProbe == null - || probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled - || !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject)) - continue; - // Work around the data issues. if (probe.localToWorldMatrix.determinant == 0) {