]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.cpp
fix a crash when the inset containing the new word at cursor is deleted
[lyx.git] / src / mathed / MathStream.cpp
index c74123c448ae72ba31ae1aedb2fa06a235011bf9..7a13955779b6028438f3f6dbc15f2f405d2020d3 100644 (file)
@@ -107,7 +107,7 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
        }
        ws.os() << s.substr(first);
        int lf = 0;
-       char_type lastchar;
+       char_type lastchar = 0;
        docstring::const_iterator dit = s.begin() + first;
        docstring::const_iterator end = s.end();
        for (; dit != end; ++dit) {
@@ -125,7 +125,7 @@ WriteStream::WriteStream(odocstream & os, bool fragile, bool latex, OutputType o
                        Encoding const * encoding)
        : os_(os), fragile_(fragile), firstitem_(false), latex_(latex),
          output_(output), pendingspace_(false), pendingbrace_(false),
-         canbreakline_(true), textmode_(false), locked_(0), ascii_(0),
+         textmode_(false), locked_(0), ascii_(0), canbreakline_(true),
          line_(0), encoding_(encoding)
 {}
 
@@ -133,7 +133,7 @@ WriteStream::WriteStream(odocstream & os, bool fragile, bool latex, OutputType o
 WriteStream::WriteStream(odocstream & os)
        : os_(os), fragile_(false), firstitem_(false), latex_(false),
          output_(wsDefault), pendingspace_(false), pendingbrace_(false),
-         canbreakline_(true), textmode_(false), locked_(0), ascii_(0),
+         textmode_(false), locked_(0), ascii_(0), canbreakline_(true),
          line_(0), encoding_(0)
 {}