]> git.lyx.org Git - features.git/commitdiff
Fix bug #8636
authorGeorg Baum <baum@lyx.org>
Sun, 21 Apr 2013 19:32:53 +0000 (21:32 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 21 Apr 2013 19:34:10 +0000 (21:34 +0200)
This was a simple logic error that crept in during refactoring:
If the format does not match, and the converted file has been read,
the string must not be read.

src/Buffer.cpp

index 1d9061ce77c2b3a96e21c0d3f0951cf18830251f..01a72f287951c4a9e9e412f7bac6b03de6a5f8be 100644 (file)
@@ -1043,8 +1043,7 @@ bool Buffer::readString(string const & s)
                if (readFile(fn) != ReadSuccess)
                        success = false;
        }
-
-       if (success)
+       else if (success)
                if (readDocument(lex))
                        success = false;
        if (fn.exists())