]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Fulfill promise to Andre: TextClass_ptr --> TextClassPtr.
[lyx.git] / src / Buffer.cpp
index 91158770d57e6c7489f569db22e9cca7faec313d..19d479cc9b2c8f1b1826723d22f479045b3dddfc 100644 (file)
@@ -1740,7 +1740,10 @@ Buffer * Buffer::getMasterBuffer()
        if (!params().parentname.empty()
            && theBufferList().exists(params().parentname)) {
                Buffer * buf = theBufferList().getBuffer(params().parentname);
-               if (buf)
+               //We need to check if the parent is us...
+               //FIXME RECURSIVE INCLUDE
+               //This is not sufficient, since recursive includes could be downstream.
+               if (buf && buf != this)
                        return buf->getMasterBuffer();
        }