1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix disposal logic

This commit is contained in:
Dean Herbert 2018-09-06 17:11:23 +09:00
parent 6a668ffe33
commit 016e395787

View File

@ -354,9 +354,13 @@ namespace osu.Game.Overlays
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
channelManager.CurrentChannel.ValueChanged -= currentChannelChanged;
channelManager.JoinedChannels.CollectionChanged -= joinedChannelsChanged;
channelManager.AvailableChannels.CollectionChanged -= availableChannelsChanged;
if (channelManager != null)
{
channelManager.CurrentChannel.ValueChanged -= currentChannelChanged;
channelManager.JoinedChannels.CollectionChanged -= joinedChannelsChanged;
channelManager.AvailableChannels.CollectionChanged -= availableChannelsChanged;
}
}
private void postMessage(TextBox textbox, bool newText)