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);
|
currentIndex += UTF8CharLength(c);
|
||||||
if (currentIndex >= (int)line.size()) {
|
if (currentIndex >= (int)line.size()) {
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
|
@ -312,13 +312,13 @@ namespace hex {
|
|||||||
|
|
||||||
EventManager::post<EventProviderDeleted>(provider);
|
EventManager::post<EventProviderDeleted>(provider);
|
||||||
|
|
||||||
s_providers.erase(it);
|
|
||||||
|
|
||||||
if (s_providers.empty())
|
if (s_providers.empty())
|
||||||
EventManager::post<EventProviderChanged>(provider, nullptr);
|
EventManager::post<EventProviderChanged>(provider, nullptr);
|
||||||
else if (it - s_providers.begin() == s_currentProvider)
|
else if (it - s_providers.begin() == s_currentProvider)
|
||||||
setCurrentProvider(0);
|
setCurrentProvider(0);
|
||||||
|
|
||||||
|
s_providers.erase(it);
|
||||||
provider->close();
|
provider->close();
|
||||||
EventManager::post<EventProviderClosed>(provider);
|
EventManager::post<EventProviderClosed>(provider);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user