From 0175b39db02603024c453e4992b0a4a958142c56 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sat, 15 Sep 2007 13:12:21 +0000 Subject: [PATCH] Fix crash with math inset with empty string. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20286 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/QLPainter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontends/qt4/QLPainter.cpp b/src/frontends/qt4/QLPainter.cpp index d290f48b21..926231990d 100644 --- a/src/frontends/qt4/QLPainter.cpp +++ b/src/frontends/qt4/QLPainter.cpp @@ -245,6 +245,9 @@ int QLPainter::smallCapsText(int x, int y, int QLPainter::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