mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Allow roommanager to be null
This commit is contained in:
parent
21cfe5a3e6
commit
7191233be8
@ -22,7 +22,7 @@ namespace osu.Game.Screens.Multi.Lounge
|
||||
private readonly RoomsContainer rooms;
|
||||
private readonly Action<Screen> pushGameplayScreen;
|
||||
|
||||
[Resolved]
|
||||
[Resolved(CanBeNull = true)]
|
||||
private RoomManager roomManager { get; set; }
|
||||
|
||||
public override string Title => "Lounge";
|
||||
@ -80,7 +80,8 @@ namespace osu.Game.Screens.Multi.Lounge
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
roomManager.OpenRequested += Open;
|
||||
if (roomManager != null)
|
||||
roomManager.OpenRequested += Open;
|
||||
}
|
||||
|
||||
protected override void UpdateAfterChildren()
|
||||
@ -130,7 +131,7 @@ namespace osu.Game.Screens.Multi.Lounge
|
||||
private void filterRooms()
|
||||
{
|
||||
rooms.Filter(Filter.CreateCriteria());
|
||||
roomManager.Filter(Filter.CreateCriteria());
|
||||
roomManager?.Filter(Filter.CreateCriteria());
|
||||
}
|
||||
|
||||
public void Open(Room room)
|
||||
|
Loading…
Reference in New Issue
Block a user