From 23972ca3d8f58c2444b2f5c0a3e4c143c7bd8285 Mon Sep 17 00:00:00 2001 From: Arne Scheffler Date: Tue, 2 Apr 2024 18:46:01 +0200 Subject: [PATCH] fix invalid iterator exception --- vstgui/lib/ctexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vstgui/lib/ctexteditor.cpp b/vstgui/lib/ctexteditor.cpp index 94468b5f4..569e9362e 100644 --- a/vstgui/lib/ctexteditor.cpp +++ b/vstgui/lib/ctexteditor.cpp @@ -1609,7 +1609,7 @@ void TextEditorView::invalidateLines (size_t pos, int32_t numChars) const ++nextLine; nextLine->range.length += line->range.length - numDel; nextLine->range.start = line->range.start; - nextLine = md.model.lines.erase (line); + nextLine = line = md.model.lines.erase (line); numLinesChanged = true; invalidateSingleLine (nextLine, 0); auto prevLine = nextLine;