]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetBibitem.cpp
Avoid using buffer() which might throw an exception
[features.git] / src / insets / InsetBibitem.cpp
index ae6105bb62fce88dee3faf058ab8616f73bab9ee..afc30ae37d395647c16ac4391912fb0ea43c835d 100644 (file)
@@ -69,10 +69,10 @@ InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p)
 InsetBibitem::~InsetBibitem()
 {
        if (isBufferLoaded()) {
-               /* Coverity believes that this may throw an exception, but
-                * actually this code path is not taken when buffer_ == 0 */
-               LATTEST(buffer_);
-               buffer().invalidateBibinfoCache();
+               /* We do not use buffer() because Coverity believes that this
+                * may throw an exception. Actually this code path is not
+                * taken when buffer_ == 0 */
+               buffer_->invalidateBibinfoCache();
        }
 }