From ad20dac17f561743d1e2dc6a6d9a43d6ece59452 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 31 Mar 2017 14:00:46 +0200 Subject: [PATCH] Catch another exception Spotted by coverity. --- src/graphics/GraphicsLoader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 26b4e5717e..b9c1e76c6e 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -403,7 +403,12 @@ void Loader::Impl::resetFile(FileName const & file) continue_monitoring = cached_item_->monitoring(); // cached_item_ is going to be reset, so the connected // signal needs to be disconnected. - sc_.disconnect(); + try { + // This can in theory throw a BufferException + sc_.disconnect(); + } catch (...) { + LYXERR(Debug::GRAPHICS, "Unable to disconnect signal."); + } cached_item_.reset(); if (status_ != Converting) { Cache::get().remove(old_file);