Merge pull request #336 from mgavioli/Fix_21000_Crash_on_deleting_segm_annotation
Fix #21000 - Deleting the last annotation of a segment causes crash
This commit is contained in:
commit
9a4c9adc34
1 changed files with 3 additions and 1 deletions
|
@ -985,8 +985,10 @@ bool Segment::findAnnotationOrElement(ElementType type, int minTrack, int maxTra
|
|||
void Segment::removeAnnotation(Element* e)
|
||||
{
|
||||
for (auto i = _annotations.begin(); i != _annotations.end(); ++i) {
|
||||
if (*i == e)
|
||||
if (*i == e) {
|
||||
_annotations.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue