mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
fix bug in lifetime of MidiView::_ghost_note
As noted in 8b389ee829, we now clear the _note_group container
before any other Note items might be deleted. But since this
may delete the _ghost_note, we have to be sure to reset
that to a null ptr to avoid a double-free later during
~MidiView
This commit is contained in:
parent
86ef6a5e59
commit
a41699737f
1 changed files with 2 additions and 0 deletions
|
|
@ -884,6 +884,8 @@ MidiView::clear_events ()
|
|||
* NoteBase objects we just deleted.
|
||||
*/
|
||||
_note_group->clear (true);
|
||||
/* the above line deleted the ghost note (if any). Make sure we know */
|
||||
_ghost_note = nullptr;
|
||||
_events.clear();
|
||||
_patch_changes.clear();
|
||||
_sys_exes.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue