From db518399a2422f6dcd8f2a98ec21bce91267afa7 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 25 Jul 2011 14:13:53 +1000 Subject: [PATCH] Crash even less Should not set pointer to zero if we're going to use it again. Task-number: QTBUG-20407 Change-Id: Iea1ea879bf3fe53e2e8ac8d93648ab28a0fc7b12 Reviewed-on: http://codereview.qt.nokia.com/2064 Reviewed-by: Qt Sanity Bot Reviewed-by: Alan Alpert --- src/declarative/particles/qsgmodelparticle.cpp | 1 - src/declarative/particles/qsgparticlesystem.cpp | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/declarative/particles/qsgmodelparticle.cpp b/src/declarative/particles/qsgmodelparticle.cpp index cb295d6..1d06a96 100644 --- a/src/declarative/particles/qsgmodelparticle.cpp +++ b/src/declarative/particles/qsgmodelparticle.cpp @@ -187,7 +187,6 @@ void QSGModelParticle::processPending() m_available << datum->modelIndex; datum->modelIndex = -1; datum->delegate = 0; - datum = 0; m_activeCount--; } diff --git a/src/declarative/particles/qsgparticlesystem.cpp b/src/declarative/particles/qsgparticlesystem.cpp index 98c685f..9ba5c67 100644 --- a/src/declarative/particles/qsgparticlesystem.cpp +++ b/src/declarative/particles/qsgparticlesystem.cpp @@ -820,6 +820,7 @@ void QSGParticleSystem::emitParticle(QSGParticleData* pd) } void QSGParticleSystem::finishNewDatum(QSGParticleData *pd){ + Q_ASSERT(pd); m_groupData[pd->group]->prepareRecycler(pd); foreach (QSGParticleAffector *a, m_affectors) -- 1.7.2.5