From: Jean-Marc Lasgouttes Date: Fri, 31 Mar 2017 09:16:08 +0000 (+0200) Subject: When destructing a workarea, ignore buffer exceptions X-Git-Tag: 2.3.0alpha1~151 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5890e9b831fcac8bc52189612ed0c37d813af4f3;p=features.git When destructing a workarea, ignore buffer exceptions Spotted by coverity, but probably harmless. --- 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_;