]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
lyx2lyx/lyx_1_6.py: fixes for r26882 as promised
[lyx.git] / src / Buffer.cpp
index 51f4ebf76258a5432fca5b34bef4b75b6a06a895..7358872b0b45b26b7ab5a893d8cc0768cf89204d 100644 (file)
@@ -116,7 +116,7 @@ namespace os = support::os;
 namespace {
 
 // Do not remove the comment below, so we get merge conflict in
-// in independent branches.
+// independent branches. Instead add your own.
 int const LYX_FORMAT = 344;  // ps: backref
 
 typedef map<string, bool> DepClean;
@@ -277,6 +277,11 @@ Buffer::~Buffer()
        // GuiView already destroyed
        gui_ = 0;
 
+       if (d->unnamed && d->filename.extension() == "internal") {
+               // No need to do additional cleanups for internal buffer.
+               delete d;
+               return;
+       }
 
        // loop over children
        Impl::BufferPositionMap::iterator it = d->children_positions.begin();