check if instrument window is disposed before playing (#5655)
This commit is contained in:
parent
b36bb8afa8
commit
7b59a205b8
1 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ namespace Content.Client.Instruments.UI
|
|||
var filters = new FileDialogFilters(new FileDialogFilters.Group("mid", "midi"));
|
||||
await using var file = await _fileDialogManager.OpenFile(filters);
|
||||
|
||||
// did the instrument menu get closed while waiting for the user to select a file?
|
||||
if (Disposed)
|
||||
return;
|
||||
|
||||
// The following checks are only in place to prevent players from playing MIDI songs locally.
|
||||
// There are equivalents for these checks on the server.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue