]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Attempt to fix bug #13017.
[lyx.git] / src / Buffer.cpp
index 732ca7e323f109503f546ec17d0d18fbe24cae59..7522dce4343938d433bf26fed31bada34d1be385 100644 (file)
@@ -2689,6 +2689,11 @@ bool Buffer::citeLabelsValid() const
 
 void Buffer::removeBiblioTempFiles() const
 {
+       if (theApp()->isBufferBusy(this)) {
+               removeBiblioTemps = true;
+               return;
+       }
+
        // We remove files that contain LaTeX commands specific to the
        // particular bibliographic style being used, in order to avoid
        // LaTeX errors when we switch style.
@@ -2702,6 +2707,7 @@ void Buffer::removeBiblioTempFiles() const
        Buffer const * const pbuf = parent();
        if (pbuf)
                pbuf->removeBiblioTempFiles();
+       removeBiblioTemps = false;
 }