From 87822d24df32311a50dc87ded55ad4d17e8226f0 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 4 Jul 2011 14:51:24 +1000 Subject: [PATCH] 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 Reviewed-by: Martin Jones --- src/declarative/particles/qsgparticlepainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp index cf1d3c2..34313bd 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()); -- 2.7.4