fix tempo marker drag crash caused by use of uninitialized map member

This commit is contained in:
Paul Davis 2022-05-02 11:49:43 -06:00
parent 00b9e3f86a
commit 90a38a2b31
1 changed files with 2 additions and 2 deletions

View File

@ -3537,7 +3537,7 @@ TempoMarkerDrag::TempoMarkerDrag (Editor* e, ArdourCanvas::Item* i, bool c)
_marker = reinterpret_cast<TempoMarker*> (_item->get_data ("marker"));
_real_section = &_marker->tempo();
_movable = !map->is_initial (_marker->tempo());
_movable = !TempoMap::use()->is_initial (_marker->tempo());
_grab_bpm = Tempo (_real_section->note_types_per_minute(), _real_section->note_type(), _real_section->end_note_types_per_minute());
_grab_qn = _real_section->beats();
assert (_marker);
@ -3554,7 +3554,7 @@ TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
/* setup thread-local tempo map ptr as a writable copy */
_editor->begin_tempo_map_edit ();
map = _editor->begin_tempo_map_edit ();
}
}