summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-21 08:27:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-21 08:27:33 (GMT)
commit6925ff13f12533428552ab8a77019f84c1a11a88 (patch)
tree23467db05e49a5a03bd91f2c0bfc8a9a488a7337 /src/opengl
parent660ec910ef60513b511e2292255e53701dbb239b (diff)
parent16ff3c87ad7b06991aa9d3a8bdc75805cd2e31b1 (diff)
downloadQt-6925ff13f12533428552ab8a77019f84c1a11a88.zip
Qt-6925ff13f12533428552ab8a77019f84c1a11a88.tar.gz
Qt-6925ff13f12533428552ab8a77019f84c1a11a88.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: Implement QAudioInput::suspend() using CMMFDevSound::Stop() Discard buffer pointer when DevSound is stopped Suppress overflow errors raised by Symbian DevSound during playback Discard empty buffer on call to QAudioOutput::resume() Permit QAudioOutput::processedUSecs() to be called immediately after start() Discard all DevSound buffers held when QAudioInput::suspend() called Fixed buffer overrun in Symbian QAudioInput backend Prevent crash in QGLGlyphCache due to dangling context references.
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp8
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*)));