diff options
author | Olivier Blin <olivier.blin@softathome.com> | 2015-02-18 19:23:30 +0100 |
---|---|---|
committer | Olivier Blin <qt@blino.org> | 2015-02-24 10:47:16 +0000 |
commit | 89536d041b057cd68797a7afa037e7f7a932f3c4 (patch) | |
tree | c62e91dcf728f1c490fc9285c24c304e21416dd9 /src/gui/painting/qpainter.cpp | |
parent | 661f6bfd032dacc62841037732816a583640e187 (diff) |
Fix crash in QPainter::drawGlyphRun() when painter is not active
Change-Id: I24f52cf1db300b8a6d0a4cb19fc6c74c41e00dbc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index d40a2b9456..de37c5635c 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -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; |