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
1 changed files with 3 additions and 2 deletions
|
@ -330,14 +330,15 @@ struct audio_play_to_end : public validate_audio_open {
|
||||||
|
|
||||||
/// Commit any pending audio timing changes
|
/// Commit any pending audio timing changes
|
||||||
/// @todo maybe move to time?
|
/// @todo maybe move to time?
|
||||||
struct audio_commit : public Command {
|
struct audio_commit : public validate_audio_open {
|
||||||
CMD_NAME("audio/commit")
|
CMD_NAME("audio/commit")
|
||||||
STR_MENU("Commit")
|
STR_MENU("Commit")
|
||||||
STR_DISP("Commit")
|
STR_DISP("Commit")
|
||||||
STR_HELP("Commit")
|
STR_HELP("Commit")
|
||||||
|
|
||||||
void operator()(agi::Context *c) {
|
void operator()(agi::Context *c) {
|
||||||
c->audioController->GetTimingController()->Commit();
|
AudioTimingController *tc = c->audioController->GetTimingController();
|
||||||
|
if (tc) tc->Commit();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue