1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:02:57 +08:00

Return older file if new one is null

This commit is contained in:
ansel 2023-01-07 18:15:57 +03:00
parent b47cef838c
commit aaeb43fbb2

View File

@ -130,7 +130,7 @@ namespace osu.Game.Screens.Edit.Setup
private void backgroundChanged(ValueChangedEvent<FileInfo?> file)
{
if (!ChangeBackgroundImage(file.NewValue!))
if (file.NewValue == null || !ChangeBackgroundImage(file.NewValue))
backgroundChooser.Current.Value = file.OldValue;
updatePlaceholderText();
@ -138,7 +138,7 @@ namespace osu.Game.Screens.Edit.Setup
private void audioTrackChanged(ValueChangedEvent<FileInfo?> file)
{
if (!ChangeAudioTrack(file.NewValue!))
if (file.NewValue == null || !ChangeAudioTrack(file.NewValue))
audioTrackChooser.Current.Value = file.OldValue;
updatePlaceholderText();