diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-05-29 10:35:40 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-05-29 11:05:47 (GMT) |
commit | 39439832b2540385bc9c9bdd8446f4cb9f16f868 (patch) | |
tree | f83f632e1b433e7ea60c71380ddfbf94d1593649 | |
parent | 57d13083bb897a469da2b822b243a36be546a5c3 (diff) | |
download | Qt-39439832b2540385bc9c9bdd8446f4cb9f16f868.zip Qt-39439832b2540385bc9c9bdd8446f4cb9f16f868.tar.gz Qt-39439832b2540385bc9c9bdd8446f4cb9f16f868.tar.bz2 |
Fixed a crash in the GL 2 paintengine when drawing text.
The new glyph cache may return null images for e.g. space characters.
Task-number: 253468
Reviewed-by: Samuel
BT: yes
(cherry picked from commit 13815a0768236982a025833497d3e2a2f3b6acf6)
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 3bbdcd4..6ce36f1 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -926,6 +926,9 @@ void QGL2PaintEngineEx::drawCachedGlyphs(const QPointF &p, const QTextItemInt &t const QImage &image = cache->image(); int margin = cache->glyphMargin(); + if (image.isNull()) + return; + glActiveTexture(QT_BRUSH_TEXTURE_UNIT); d->ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true); |