Crash even less
authorAlan Alpert <alan.alpert@nokia.com>
Mon, 25 Jul 2011 04:13:53 +0000 (14:13 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jul 2011 02:40:21 +0000 (04:40 +0200)
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 <qt_sanity_bot@ovi.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
src/declarative/particles/qsgmodelparticle.cpp
src/declarative/particles/qsgparticlesystem.cpp

index cb295d6..1d06a96 100644 (file)
@@ -187,7 +187,6 @@ void QSGModelParticle::processPending()
             m_available << datum->modelIndex;
             datum->modelIndex = -1;
             datum->delegate = 0;
-            datum = 0;
             m_activeCount--;
         }
 
index 98c685f..9ba5c67 100644 (file)
@@ -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)