catch a potential segfault (unload session)

This commit is contained in:
Robin Gareus 2015-12-10 12:46:24 +01:00
parent ed74299e1e
commit 7409d5f224
1 changed files with 5 additions and 1 deletions

View File

@ -2123,9 +2123,13 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
void
ARDOUR_UI::toggle_session_auto_loop ()
{
if (!_session) {
return;
}
Location * looploc = _session->locations()->auto_loop_location();
if (!_session || !looploc) {
if (!looploc) {
return;
}