File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
com.unity.render-pipelines.high-definition
Editor/Lighting/Reflection Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1818- Fixed ShaderGraph Decal material not showing exposed properties.
1919- Fixed wrong coat normal space in shader graph
2020- Fixed issue with faulty shadow transition when view is close to an object under some aspect ratio conditions
21+ - Fixed NullPointerException when baking probes from the lighting window (case 1289680)
2122
2223### Changed
2324- Removed the material pass probe volumes evaluation mode.
Original file line number Diff line number Diff line change @@ -322,20 +322,22 @@ IScriptableBakedReflectionSystemStageNotifier handle
322322 // == 5. ==
323323
324324 // Create new baked state array
325- var targetSize = m_HDProbeBakedStates . Length + addCount - remCount ;
325+ var targetSize = m_HDProbeBakedStates . Length - remCount + toBakeIndicesList . Count ;
326326 var targetBakedStates = stackalloc HDProbeBakedState [ targetSize ] ;
327327 // Copy baked state that are not removed
328328 var targetI = 0 ;
329329 for ( int i = 0 ; i < m_HDProbeBakedStates . Length ; ++ i )
330330 {
331331 if ( CoreUnsafeUtils . IndexOf ( remIndices , remCount , i ) != - 1 )
332332 continue ;
333+ Assert . IsTrue ( targetI < targetSize ) ;
333334 targetBakedStates [ targetI ++ ] = m_HDProbeBakedStates [ i ] ;
334335 }
335336 // Add new baked states
336337 for ( int i = 0 ; i < toBakeIndicesList . Count ; ++ i )
337338 {
338339 var state = states [ toBakeIndicesList . GetUnchecked ( i ) ] ;
340+ Assert . IsTrue ( targetI < targetSize ) ;
339341 targetBakedStates [ targetI ++ ] = new HDProbeBakedState
340342 {
341343 instanceID = state . instanceID ,
You can’t perform that action at this time.
0 commit comments