1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:47:51 +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,7 +25,8 @@ namespace osu.Game.Graphics.Containers
{ {
if (value == expandableHeader) return; if (value == expandableHeader) return;
Remove(expandableHeader); if (expandableHeader != null)
Remove(expandableHeader);
expandableHeader = value; expandableHeader = value;
expandableHeader.Depth = float.MinValue; expandableHeader.Depth = float.MinValue;
Add(expandableHeader); Add(expandableHeader);
@ -40,7 +41,8 @@ namespace osu.Game.Graphics.Containers
{ {
if (value == fixedHeader) return; if (value == fixedHeader) return;
Remove(fixedHeader); if (fixedHeader != null)
Remove(fixedHeader);
fixedHeader = value; fixedHeader = value;
fixedHeader.Depth = float.MinValue / 2; fixedHeader.Depth = float.MinValue / 2;
Add(fixedHeader); Add(fixedHeader);