From 9a59ee8eb87fe1603a98531cd4f25547b7d511dd Mon Sep 17 00:00:00 2001 From: Julien Ignace Date: Mon, 25 May 2020 13:25:48 +0200 Subject: [PATCH 1/2] Fixed a wrong condition in camera switcher, potentially causing out of bound exceptions. --- .../Runtime/Camera/CameraSwitcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs b/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs index 91754c7bdaf..8f8772bec44 100644 --- a/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs +++ b/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs @@ -89,7 +89,7 @@ Camera GetNextCamera() void SetCameraIndex(int index) { - if (index > 0 || index < GetCameraCount()) + if (index > 0 && index < GetCameraCount()) { m_CurrentCameraIndex = index; From c2995aab4654b28b092c7e679059d85c22615889 Mon Sep 17 00:00:00 2001 From: Julien Ignace Date: Mon, 25 May 2020 13:26:27 +0200 Subject: [PATCH 2/2] update changelog. --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ae3344ebf39..3d11f0a06ac 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -622,6 +622,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed Wizard check on default volume profile to also check it is not the default one in package. - Fix erroneous central depth sampling in TAA. - Fixed light layers not correctly disabled when the lightlayers is set to Nothing and Lightlayers isn't enabled in HDRP Asset +- Fixed a wrong condition in CameraSwitcher, potentially causing out of bound exceptions. ### Changed - Improve MIP selection for decals on Transparents