mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00: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.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Development;
|
||||
@ -97,6 +98,7 @@ namespace osu.Game
|
||||
|
||||
private MainMenu menuScreen;
|
||||
|
||||
[CanBeNull]
|
||||
private IntroScreen introScreen;
|
||||
|
||||
private Bindable<int> configRuleset;
|
||||
@ -914,7 +916,7 @@ namespace osu.Game
|
||||
if (ScreenStack.CurrentScreen is Loader)
|
||||
return false;
|
||||
|
||||
if (introScreen.DidLoadMenu && !(ScreenStack.CurrentScreen is IntroScreen))
|
||||
if (introScreen?.DidLoadMenu == true && !(ScreenStack.CurrentScreen is IntroScreen))
|
||||
{
|
||||
Scheduler.Add(introScreen.MakeCurrent);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user