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:
parent
b47cef838c
commit
aaeb43fbb2
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user