diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-07-04 14:51:24 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-04 07:00:04 +0200 |
commit | 87822d24df32311a50dc87ded55ad4d17e8226f0 (patch) | |
tree | bb2bd968c5316e014ef035cb2a9099ff278c5dbe /src/declarative/particles | |
parent | 5b84efd6c321b9e7ffb850bae3eebb8325eac725 (diff) |
Avoid crash on exit
QSParticlePainter could call QSGItem::mapFromItem while the scene was
being destroyed.
Change-Id: If9356dae6aadf97b853c2aaf51870751bbbab711
Reviewed-on: http://codereview.qt.nokia.com/1023
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/particles')
-rw-r--r-- | src/declarative/particles/qsgparticlepainter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp index cf1d3c2894..34313bd4fb 100644 --- a/src/declarative/particles/qsgparticlepainter.cpp +++ b/src/declarative/particles/qsgparticlepainter.cpp @@ -172,7 +172,7 @@ int QSGParticlePainter::particleTypeIndex(QSGParticleData* d) void QSGParticlePainter::calcSystemOffset() { - if(!m_system) + if (!m_system || !parentItem()) return; QPointF lastOffset = m_systemOffset; m_systemOffset = -1 * this->mapFromItem(m_system, QPointF()); |