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
This commit is contained in:
Abdelrazak Younes 2007-09-15 13:12:21 +00:00
parent c9a12aabdc
commit 0175b39db0

View File

@ -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