Skip to content

Commit 0ef73bc

Browse files
authored
Fix null reference when processing light probe (#131)
1 parent 2a44373 commit 0ef73bc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
530530
- Fixed compile error with XR SubsystemManager.
531531
- Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996)
532532
- Fixed culling of planar reflection probes that change position (case 1218651)
533+
- Fixed null reference when processing lightprobe (case 1235285)
533534

534535
### Changed
535536
- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled

com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,17 +2506,17 @@ int PreprocessVisibleProbes(HDCamera hdCamera, CullingResults cullResults, HDPro
25062506
{
25072507
var probe = cullResults.visibleReflectionProbes[probeIndex];
25082508

2509+
if (probe.reflectionProbe == null
2510+
|| probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled
2511+
|| !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject))
2512+
continue;
2513+
25092514
ref ProcessedProbeData processedData = ref m_ProcessedReflectionProbeData[probeIndex];
25102515
PreprocessReflectionProbeData(ref processedData, probe, hdCamera);
25112516

25122517
if (TrivialRejectProbe(processedData, hdCamera))
25132518
continue;
25142519

2515-
if (probe.reflectionProbe == null
2516-
|| probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled
2517-
|| !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject))
2518-
continue;
2519-
25202520
// Work around the data issues.
25212521
if (probe.localToWorldMatrix.determinant == 0)
25222522
{

0 commit comments

Comments
 (0)