diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-08-28 09:00:59 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-08-28 09:05:36 (GMT) |
commit | 2d668d870d4acd90e0ee4ff27e65e92fd311ce22 (patch) | |
tree | e869e6bfed34b8e256b2c8e627094de6a1d5f4a4 /src/gui | |
parent | 05d6c58f239c9f72cf246b91fa89858aaf6cc0c5 (diff) | |
download | Qt-2d668d870d4acd90e0ee4ff27e65e92fd311ce22.zip Qt-2d668d870d4acd90e0ee4ff27e65e92fd311ce22.tar.gz Qt-2d668d870d4acd90e0ee4ff27e65e92fd311ce22.tar.bz2 |
Fix crash in backingstore when QWidget::paintEngine() returns 0
Reviewed-by: Samuel
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 4f45c3d..4665b66 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -1544,8 +1544,8 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn) // QGLWidget does not support partial updates if: // 1) The context is double buffered // 2) The context is single buffered and auto-fill background is enabled. - const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL - || engine->type() == QPaintEngine::OpenGL2) + const bool noPartialUpdateSupport = (engine && (engine->type() == QPaintEngine::OpenGL + || engine->type() == QPaintEngine::OpenGL2)) && (usesDoubleBufferedGLContext || q->autoFillBackground()); QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn); |