diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ScintillaBase.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 93c41d3d9..1e55fcfbf 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -584,14 +584,22 @@ LexState::LexState(Document *pdoc_) noexcept : LexInterface(pdoc_) { LexState::~LexState() { if (instance) { - instance->Release(); + try { + instance->Release(); + } catch (...) { + // ILexer5::Release must not throw, ignore if it does. + } instance = nullptr; } } void LexState::SetInstance(ILexer5 *instance_) { if (instance) { - instance->Release(); + try { + instance->Release(); + } catch (...) { + // ILexer5::Release must not throw, ignore if it does. + } instance = nullptr; } instance = instance_; |