summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-05-29 10:35:40 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-05-29 10:37:09 (GMT)
commit13815a0768236982a025833497d3e2a2f3b6acf6 (patch)
tree48cd9715e640e9025a9db44dbe5988a7ac8e932f /src/opengl
parent909f96a4f92ad3c9fed1dc4c3873b638421568b0 (diff)
downloadQt-13815a0768236982a025833497d3e2a2f3b6acf6.zip
Qt-13815a0768236982a025833497d3e2a2f3b6acf6.tar.gz
Qt-13815a0768236982a025833497d3e2a2f3b6acf6.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
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index a74f044..beb4da6 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);