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:
Thomas Goyne 2011-12-29 15:12:36 +00:00
parent d192f1c332
commit d01d7eb78b
1 changed files with 3 additions and 2 deletions

View File

@ -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();
}
};