Fix crash in QPainter::drawGlyphRun() when painter is not active

Change-Id: I24f52cf1db300b8a6d0a4cb19fc6c74c41e00dbc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
bb10
Olivier Blin 2015-02-18 19:23:30 +01:00 committed by Olivier Blin
parent 661f6bfd03
commit 89536d041b
1 changed files with 5 additions and 0 deletions

View File

@ -5534,6 +5534,11 @@ void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
{
Q_D(QPainter);
if (!d->engine) {
qWarning("QPainter::drawGlyphRun: Painter not active");
return;
}
QRawFont font = glyphRun.rawFont();
if (!font.isValid())
return;