diff options
author | Neil <nyamatongwe@gmail.com> | 2017-05-22 10:19:46 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-05-22 10:19:46 +1000 |
commit | a07eca41846561377a50602e9075aac3601eaf95 (patch) | |
tree | 0ec24c1a0e3cef76009e71686382a1dbe9ff2170 | |
parent | 991aecc37e78f6adf3b27fb39f75f20c3cc803fa (diff) | |
download | scintilla-mirror-a07eca41846561377a50602e9075aac3601eaf95.tar.gz |
Fix a crash when a line containing a marker was deleted.
-rw-r--r-- | src/PerLine.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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() { |