Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit b29a561

Browse files
committed
Fixed a weird serialization-related error in the console
Happens when a volume is opened in the inspector and Unity finishes recompiling
1 parent 05d7fdc commit b29a561

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

PostProcessing/Editor/PostProcessProfileEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ void OnEnable()
1515

1616
void OnDisable()
1717
{
18-
m_EffectList.Clear();
18+
if (m_EffectList != null)
19+
m_EffectList.Clear();
1920
}
2021

2122
public override void OnInspectorGUI()

PostProcessing/Editor/PostProcessVolumeEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ void OnEnable()
3030

3131
void OnDisable()
3232
{
33-
m_EffectList.Clear();
33+
if (m_EffectList != null)
34+
m_EffectList.Clear();
3435
}
3536

3637
void RefreshEffectListEditor(PostProcessProfile asset)

0 commit comments

Comments
 (0)