mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Fix thinko in e81b2353cc, selection may not start at a marker
This fixes a crash when selecting a section, and then changing the time-selection. Previously it was assumed that the section context menu can only be shown for sections. But it applies to any time[line]-selection.
This commit is contained in:
parent
d1cc71150f
commit
c0287cb0de
1 changed files with 2 additions and 3 deletions
|
|
@ -1608,10 +1608,9 @@ Editor::popup_section_box_menu (int button, int32_t time)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
timepos_t start, end;
|
timepos_t start, end;
|
||||||
if (get_selection_extents (start, end)) {
|
Location* l;
|
||||||
|
if (get_selection_extents (start, end) && NULL != (l = _session->locations ()->mark_at (start))) {
|
||||||
/* add some items from build_marker_menu () */
|
/* add some items from build_marker_menu () */
|
||||||
Location* l = _session->locations ()->mark_at (start);
|
|
||||||
assert (l);
|
|
||||||
LocationMarkers* lm = find_location_markers (l);
|
LocationMarkers* lm = find_location_markers (l);
|
||||||
assert (lm && lm->start);
|
assert (lm && lm->start);
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue