From a07eca41846561377a50602e9075aac3601eaf95 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 May 2017 10:19:46 +1000 Subject: Fix a crash when a line containing a marker was deleted. --- src/PerLine.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 6eb37ad1a..b258c745c 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -78,7 +78,11 @@ bool MarkerHandleSet::RemoveNumber(int markerNum, bool all) { } void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { - mhList.splice_after(mhList.cbegin(), other->mhList); + if (mhList.empty()) { + mhList = std::move(other->mhList); + } else { + mhList.splice_after(mhList.cbegin(), other->mhList); + } } LineMarkers::~LineMarkers() { -- cgit v1.2.3