]> git.lyx.org Git - lyx.git/commitdiff
Catch another exception
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 Mar 2017 12:00:46 +0000 (14:00 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 Mar 2017 12:00:46 +0000 (14:00 +0200)
Spotted by coverity.

src/graphics/GraphicsLoader.cpp

index 26b4e5717e2616f050e1c0f74847c42d9cb0527f..b9c1e76c6e1f93d968457f3153afd793f90f4870 100644 (file)
@@ -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);