1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 21:23:04 +08:00

Fix fields being null.

This commit is contained in:
Huo Yaoyuan 2017-05-20 07:07:27 +08:00
parent e06c917c95
commit 473441dfd4

View File

@ -25,6 +25,7 @@ namespace osu.Game.Graphics.Containers
{ {
if (value == expandableHeader) return; if (value == expandableHeader) return;
if (expandableHeader != null)
Remove(expandableHeader); Remove(expandableHeader);
expandableHeader = value; expandableHeader = value;
expandableHeader.Depth = float.MinValue; expandableHeader.Depth = float.MinValue;
@ -40,6 +41,7 @@ namespace osu.Game.Graphics.Containers
{ {
if (value == fixedHeader) return; if (value == fixedHeader) return;
if (fixedHeader != null)
Remove(fixedHeader); Remove(fixedHeader);
fixedHeader = value; fixedHeader = value;
fixedHeader.Depth = float.MinValue / 2; fixedHeader.Depth = float.MinValue / 2;