]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathPhantom.cpp
Fix bug #8889 by always issuing \protect in fragile environments.
[lyx.git] / src / mathed / InsetMathPhantom.cpp
index bbc2234a1863b2fe59f442a40c59e6f4af5583cd..cd4ae451cfdcf7b594302ddd5c392b4171358441 100644 (file)
@@ -240,6 +240,8 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
 void InsetMathPhantom::write(WriteStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        switch (kind_) {
        case phantom:
                os << "\\phantom{";