check if instrument window is disposed before playing (#5655)
This commit is contained in:
@@ -79,6 +79,10 @@ namespace Content.Client.Instruments.UI
|
|||||||
var filters = new FileDialogFilters(new FileDialogFilters.Group("mid", "midi"));
|
var filters = new FileDialogFilters(new FileDialogFilters.Group("mid", "midi"));
|
||||||
await using var file = await _fileDialogManager.OpenFile(filters);
|
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.
|
// The following checks are only in place to prevent players from playing MIDI songs locally.
|
||||||
// There are equivalents for these checks on the server.
|
// There are equivalents for these checks on the server.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user