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

View file

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