13
0

fix for crash caused as slave is switching from non-TC source to TC-source

git-svn-id: svn://localhost/ardour2/branches/3.0@13453 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-11-12 16:48:50 +00:00
parent 7253e8ff84
commit c214f1630a

View File

@ -1044,14 +1044,12 @@ AudioClock::set_slave_info ()
TimecodeSlave* tcslave;
if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
} else {
matching = true;
_left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"%2\">%3</span>",
INFO_FONT_SIZE, (matching?X_("green"):X_("red")),
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
_right_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
INFO_FONT_SIZE, slave->approximate_current_delta()));
}
_left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"%2\">%3</span>",
INFO_FONT_SIZE, (matching?"green":"red"),
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
_right_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
INFO_FONT_SIZE, slave->approximate_current_delta()));
} else {
_left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
INFO_FONT_SIZE, _("--pending--")));