mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 00:47:24 +08:00
Merge pull request #8982 from peppy/fix-nullref-on-early-exit
Fix null reference causing hard freeze if game is forcefully closed during disclaimer
This commit is contained in:
commit
c9b1735a53
@ -18,6 +18,7 @@ using osu.Game.Screens.Menu;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Development;
|
using osu.Framework.Development;
|
||||||
@ -97,6 +98,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
private MainMenu menuScreen;
|
private MainMenu menuScreen;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
private IntroScreen introScreen;
|
private IntroScreen introScreen;
|
||||||
|
|
||||||
private Bindable<int> configRuleset;
|
private Bindable<int> configRuleset;
|
||||||
@ -914,7 +916,7 @@ namespace osu.Game
|
|||||||
if (ScreenStack.CurrentScreen is Loader)
|
if (ScreenStack.CurrentScreen is Loader)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (introScreen.DidLoadMenu && !(ScreenStack.CurrentScreen is IntroScreen))
|
if (introScreen?.DidLoadMenu == true && !(ScreenStack.CurrentScreen is IntroScreen))
|
||||||
{
|
{
|
||||||
Scheduler.Add(introScreen.MakeCurrent);
|
Scheduler.Add(introScreen.MakeCurrent);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user