From 5afe768b67fb9ec322762faff7fc051e384e8187 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sat, 15 Sep 2007 12:34:21 +0000 Subject: [PATCH] Fix crash with math inset with empty string. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20284 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPainter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index 465572b10a..b8a692602e 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -245,6 +245,9 @@ int GuiPainter::smallCapsText(int x, int y, 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 -- 2.39.2