From f83d7478a90409a226a9a9b78e93659b8c87c1e9 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Fri, 1 May 2020 20:03:18 -0400 Subject: [PATCH 1/2] fix a null ref exception when running playmode tests with the render pipeline debug window opened --- .../Runtime/Debugging/DebugUI.Fields.cs | 3 +++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs b/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs index b6a1f5df4d5..db7df12511f 100644 --- a/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs +++ b/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs @@ -320,6 +320,9 @@ internal void InitQuickSeparators() internal void InitIndexes() { + if (enumNames == null) + return; + indexes = new int[enumNames.Length]; for (int i = 0; i < enumNames.Length; i++) { diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ac2cdd2ba4c..c88db58f98e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -569,6 +569,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shadowmask UI now correctly showing shadowmask disable - Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. - Fixed a null ref exception in static sky when the default volume profile is invalid. +- Fixed a null ref exception when running playmode tests with the render pipeline debug window opened. ### Changed - Improve MIP selection for decals on Transparents From 8cbd4cb2aa9a510c4d18d8ec1006dedce72c9aa0 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Tue, 5 May 2020 11:29:00 -0400 Subject: [PATCH 2/2] use empty array --- .../Runtime/Debugging/DebugUI.Fields.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs b/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs index db7df12511f..d2005a63f8a 100644 --- a/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs +++ b/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs @@ -321,7 +321,7 @@ internal void InitQuickSeparators() internal void InitIndexes() { if (enumNames == null) - return; + enumNames = new GUIContent[0]; indexes = new int[enumNames.Length]; for (int i = 0; i < enumNames.Length; i++)