This should go in branch too Juergen. I had a crash because of it with attached document (won't crash in Linux because of the disabled pixmap cache).

Abdel.

[EMAIL PROTECTED] wrote:
Author: younes
Date: Sat Sep 15 14:34:21 2007
New Revision: 20284

URL: http://www.lyx.org/trac/changeset/20284
Log:
Fix crash with math inset with empty string.

Modified:
    lyx-devel/trunk/src/frontends/qt4/GuiPainter.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/GuiPainter.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiPainter.cpp?rev=20284
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiPainter.cpp (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiPainter.cpp Sat Sep 15 14:34:21 2007
@@ -245,6 +245,9 @@
 int GuiPainter::text(int x, int y, docstring const & s,
                Font const & f)
 {
+       if (s.empty())
+               return 0;
+
        /* Caution: The following ucs4 to QString conversions work for symbol 
fonts
        only because they are no real conversions but simple casts in reality.
        When we want to draw a symbol or calculate the metrics we pass the 
position




Attachment: LyXMathDWoes.lyx
Description: application/lyx

Reply via email to