1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:07:25 +08:00

Handle null current channel in setter, update framework.

This commit is contained in:
naoey 2017-08-24 10:40:42 +05:30
parent 3f403ba524
commit 6291bd5ced
2 changed files with 11 additions and 7 deletions

@ -1 +1 @@
Subproject commit 1ba1e8ef1e5ec0466632be02492023a081cb85ab
Subproject commit d492c2ffe6ce5dac2a8e05118d86e6907186329b

View File

@ -334,7 +334,15 @@ namespace osu.Game.Overlays
set
{
if (currentChannel == value || value == null) return;
if (currentChannel == value) return;
if (value == null)
{
currentChannel = null;
textbox.Current.Disabled = true;
currentChannelContainer.Clear(false);
return;
}
currentChannel = value;
@ -397,11 +405,7 @@ namespace osu.Game.Overlays
{
if (channel == null) return;
if (channel == CurrentChannel)
{
currentChannel = null;
currentChannelContainer.Clear(false);
}
if (channel == CurrentChannel) CurrentChannel = null;
careChannels.Remove(channel);
loadedChannels.Remove(loadedChannels.Find(c => c.Channel == channel));