From 5890e9b831fcac8bc52189612ed0c37d813af4f3 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 31 Mar 2017 11:16:08 +0200 Subject: [PATCH] When destructing a workarea, ignore buffer exceptions Spotted by coverity, but probably harmless. --- src/frontends/qt4/GuiWorkArea.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index b87bb48f4c..084377231f 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -341,7 +341,10 @@ void GuiWorkArea::init() GuiWorkArea::~GuiWorkArea() { - d->buffer_view_->buffer().workAreaManager().remove(this); + // If something is wrong with the buffer, we can ignore it safely + try { + d->buffer_view_->buffer().workAreaManager().remove(this); + } catch(...) {} delete d->screen_; delete d->buffer_view_; delete d->cursor_;