fix: More invalid iterator accesses
This commit is contained in:
parent
f21c80c48a
commit
01917439dd
4
lib/external/imgui/source/TextEditor.cpp
vendored
4
lib/external/imgui/source/TextEditor.cpp
vendored
@ -2041,7 +2041,9 @@ void TextEditor::ColorizeInternal() {
|
||||
}
|
||||
}
|
||||
}
|
||||
line[currentIndex].mPreprocessor = withinPreproc;
|
||||
if (currentIndex < line.size())
|
||||
line[currentIndex].mPreprocessor = withinPreproc;
|
||||
|
||||
currentIndex += UTF8CharLength(c);
|
||||
if (currentIndex >= (int)line.size()) {
|
||||
currentIndex = 0;
|
||||
|
@ -312,13 +312,13 @@ namespace hex {
|
||||
|
||||
EventManager::post<EventProviderDeleted>(provider);
|
||||
|
||||
s_providers.erase(it);
|
||||
|
||||
if (s_providers.empty())
|
||||
EventManager::post<EventProviderChanged>(provider, nullptr);
|
||||
else if (it - s_providers.begin() == s_currentProvider)
|
||||
setCurrentProvider(0);
|
||||
|
||||
s_providers.erase(it);
|
||||
provider->close();
|
||||
EventManager::post<EventProviderClosed>(provider);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user