13
0

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...
This commit is contained in:
Robin Gareus 2019-08-23 23:54:34 +02:00
parent 37d51037b9
commit 2920bd0253
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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()) {