mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Merge branch 'master' into fix-spectator-preview-crash
This commit is contained in:
commit
34f09e2e20
@ -144,9 +144,9 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
if (selected)
|
||||
{
|
||||
selectionBox.Show();
|
||||
if (editor)
|
||||
if (editor && editorInfo != null)
|
||||
editorInfo.Selected.Value = Match;
|
||||
else
|
||||
else if (ladderInfo != null)
|
||||
ladderInfo.CurrentMatch.Value = Match;
|
||||
}
|
||||
else
|
||||
|
@ -46,12 +46,15 @@ namespace osu.Game.Online
|
||||
{
|
||||
if (modelInfo.NewValue == null)
|
||||
attachDownload(null);
|
||||
else if (manager.IsAvailableLocally(modelInfo.NewValue))
|
||||
else if (manager?.IsAvailableLocally(modelInfo.NewValue) == true)
|
||||
State.Value = DownloadState.LocallyAvailable;
|
||||
else
|
||||
attachDownload(manager.GetExistingDownload(modelInfo.NewValue));
|
||||
attachDownload(manager?.GetExistingDownload(modelInfo.NewValue));
|
||||
}, true);
|
||||
|
||||
if (manager == null)
|
||||
return;
|
||||
|
||||
managerDownloadBegan = manager.DownloadBegan.GetBoundCopy();
|
||||
managerDownloadBegan.BindValueChanged(downloadBegan);
|
||||
managerDownloadFailed = manager.DownloadFailed.GetBoundCopy();
|
||||
|
@ -248,7 +248,9 @@ namespace osu.Game.Online.Leaderboards
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
if (api != null)
|
||||
apiState.BindTo(api.State);
|
||||
|
||||
apiState.BindValueChanged(onlineStateChanged, true);
|
||||
}
|
||||
|
||||
@ -303,7 +305,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
PlaceholderState = PlaceholderState.NetworkFailure;
|
||||
});
|
||||
|
||||
api.Queue(getScoresRequest);
|
||||
api?.Queue(getScoresRequest);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
if (string.IsNullOrEmpty(api.ProvidedUsername))
|
||||
if (string.IsNullOrEmpty(api?.ProvidedUsername))
|
||||
{
|
||||
this.FadeOut();
|
||||
this.Push(new ScreenEntry());
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuColour colours, OsuGame game, TextureStore textures)
|
||||
{
|
||||
if (string.IsNullOrEmpty(api.ProvidedUsername))
|
||||
if (string.IsNullOrEmpty(api?.ProvidedUsername))
|
||||
return;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
|
@ -217,7 +217,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
private void performLogin()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
||||
api.Login(username.Text, password.Text);
|
||||
api?.Login(username.Text, password.Text);
|
||||
else
|
||||
shakeSignIn.Shake();
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace osu.Game
|
||||
// a dialog may be blocking the execution for now.
|
||||
if (checkForDialog(current)) return;
|
||||
|
||||
game.CloseAllOverlays(false);
|
||||
game?.CloseAllOverlays(false);
|
||||
|
||||
// we may already be at the target screen type.
|
||||
if (validScreens.Contains(getCurrentScreen().GetType()) && !beatmap.Disabled)
|
||||
|
@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.UI
|
||||
{
|
||||
Debug.Assert(!drawableMap.ContainsKey(entry));
|
||||
|
||||
var drawable = pooledObjectProvider.GetPooledDrawableRepresentation(entry.HitObject);
|
||||
var drawable = pooledObjectProvider?.GetPooledDrawableRepresentation(entry.HitObject);
|
||||
if (drawable == null)
|
||||
throw new InvalidOperationException($"A drawable representation could not be retrieved for hitobject type: {entry.HitObject.GetType().ReadableName()}.");
|
||||
|
||||
|
@ -457,6 +457,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (movementBlueprint == null)
|
||||
return false;
|
||||
|
||||
if (snapProvider == null)
|
||||
return true;
|
||||
|
||||
Debug.Assert(movementBlueprintOriginalPosition != null);
|
||||
|
||||
HitObject draggedObject = movementBlueprint.HitObject;
|
||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// </summary>
|
||||
protected virtual void OnOperationBegan()
|
||||
{
|
||||
ChangeHandler.BeginChange();
|
||||
ChangeHandler?.BeginChange();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// </summary>
|
||||
protected virtual void OnOperationEnded()
|
||||
{
|
||||
ChangeHandler.EndChange();
|
||||
ChangeHandler?.EndChange();
|
||||
}
|
||||
|
||||
#region User Input Handling
|
||||
|
@ -96,7 +96,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
if (lastDragEvent != null)
|
||||
OnDrag(lastDragEvent);
|
||||
|
||||
if (Composer != null)
|
||||
if (Composer != null && timeline != null)
|
||||
{
|
||||
Composer.Playfield.PastLifetimeExtension = timeline.VisibleRange / 2;
|
||||
Composer.Playfield.FutureLifetimeExtension = timeline.VisibleRange / 2;
|
||||
|
@ -128,7 +128,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
controlPointGroups.BindCollectionChanged((sender, args) =>
|
||||
{
|
||||
table.ControlGroups = controlPointGroups;
|
||||
changeHandler.SaveState();
|
||||
changeHandler?.SaveState();
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,9 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
{
|
||||
scheduledFilterUpdate?.Cancel();
|
||||
|
||||
if (filter == null)
|
||||
return;
|
||||
|
||||
filter.Value = new FilterCriteria
|
||||
{
|
||||
SearchString = Search.Current.Value ?? string.Empty,
|
||||
|
Loading…
Reference in New Issue
Block a user