]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Revert "Attempt to fix bug 9158 using updateBuffer."
[lyx.git] / src / insets / InsetInclude.cpp
index 89f2533111a99f04cc6f9551c5577750c6cf5de5..7b6f38950f0cbc0229f4518ad04d2828a121ff89 100644 (file)
@@ -197,6 +197,11 @@ InsetInclude::InsetInclude(InsetInclude const & other)
 
 InsetInclude::~InsetInclude()
 {
+       if (isBufferLoaded())
+               /* 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_->invalidateBibfileCache();
        delete label_;
 }
 
@@ -349,6 +354,8 @@ void InsetInclude::setParams(InsetCommandParams const & p)
 
        if (type(params()) == INPUT)
                add_preview(*preview_, *this, buffer());
+
+       buffer().invalidateBibfileCache();
 }