Fix bug #6337, clicking in canvas without session loaded causes crash
This commit is contained in:
parent
c342769925
commit
07dc805919
@ -3291,6 +3291,10 @@ CursorDrag::CursorDrag (Editor* e, EditorCursor& c, bool s)
|
||||
void
|
||||
CursorDrag::fake_locate (framepos_t t)
|
||||
{
|
||||
if (_editor->session () == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
_editor->playhead_cursor->set_position (t);
|
||||
|
||||
Session* s = _editor->session ();
|
||||
|
@ -1139,7 +1139,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
||||
}
|
||||
|
||||
//not rolling, range mode click + join_play_range : locate the PH here
|
||||
if ( !_drags->active () && !_session->transport_rolling() && ( effective_mouse_mode() == MouseRange ) && ARDOUR_UI::config()->get_follow_edits() ) {
|
||||
if ( !_drags->active () && _session && !_session->transport_rolling() && ( effective_mouse_mode() == MouseRange ) && ARDOUR_UI::config()->get_follow_edits() ) {
|
||||
framepos_t where = canvas_event_sample (event);
|
||||
snap_to(where);
|
||||
_session->request_locate (where, false);
|
||||
|
Loading…
Reference in New Issue
Block a user