diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-21 07:24:47 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-21 07:24:47 (GMT) |
commit | 16ff3c87ad7b06991aa9d3a8bdc75805cd2e31b1 (patch) | |
tree | 23467db05e49a5a03bd91f2c0bfc8a9a488a7337 /src/opengl | |
parent | 660ec910ef60513b511e2292255e53701dbb239b (diff) | |
parent | 2836c2806e3bdfb6d29d99f74f1b15950fa39e35 (diff) | |
download | Qt-16ff3c87ad7b06991aa9d3a8bdc75805cd2e31b1.zip Qt-16ff3c87ad7b06991aa9d3a8bdc75805cd2e31b1.tar.gz Qt-16ff3c87ad7b06991aa9d3a8bdc75805cd2e31b1.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index a5ec12f..58778ea 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -4735,9 +4735,11 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, font_cache = new QGLFontGlyphHash; // qDebug() << "new context" << context << font_cache; qt_context_cache.insert(context, font_cache); - if (context->isValid() && context->device()->devType() == QInternal::Widget) { - QWidget *widget = static_cast<QWidget *>(context->device()); - connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); + if (context->isValid()) { + if (context->device()->devType() == QInternal::Widget) { + QWidget *widget = static_cast<QWidget *>(context->device()); + connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); + } connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), SLOT(cleanupContext(const QGLContext*))); |