mirror of https://github.com/odrling/Aegisub
Fix crash when the audio commit hotkey is pressed with the grid focused and no audio open
Originally committed to SVN as r6185.
This commit is contained in:
parent
d192f1c332
commit
d01d7eb78b
|
@ -330,14 +330,15 @@ struct audio_play_to_end : public validate_audio_open {
|
|||
|
||||
/// Commit any pending audio timing changes
|
||||
/// @todo maybe move to time?
|
||||
struct audio_commit : public Command {
|
||||
struct audio_commit : public validate_audio_open {
|
||||
CMD_NAME("audio/commit")
|
||||
STR_MENU("Commit")
|
||||
STR_DISP("Commit")
|
||||
STR_HELP("Commit")
|
||||
|
||||
void operator()(agi::Context *c) {
|
||||
c->audioController->GetTimingController()->Commit();
|
||||
AudioTimingController *tc = c->audioController->GetTimingController();
|
||||
if (tc) tc->Commit();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue