diff options
author | Robin Gareus <robin@gareus.org> | 2019-08-23 23:54:34 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-08-23 23:54:34 +0200 |
commit | 2920bd0253be94155c440368f50f9ca2763ddf0f (patch) | |
tree | 018b7c8b7c0c6dfe079d6b2eb844c584c4897b7f /gtk2_ardour/editor_selection.cc | |
parent | 37d51037b94e7ddf0ff0398a5c22a752be52cbd3 (diff) |
Region selection cannot change without a session
Without a session, there are no regions. Besides,
there is an unconditional call using _session directly
after the if (_session) clause, which would segfault...
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 5929567769..9704812d7d 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1578,13 +1578,12 @@ Editor::region_selection_changed () sensitize_the_right_region_actions (false); /* propagate into backend */ + assert (_session); - if (_session) { - if (!selection->regions.empty()) { - _session->set_object_selection (selection->regions.start(), selection->regions.end_sample()); - } else { - _session->clear_object_selection (); - } + if (!selection->regions.empty()) { + _session->set_object_selection (selection->regions.start(), selection->regions.end_sample()); + } else { + _session->clear_object_selection (); } if (_session->solo_selection_active()) { |