From 704b408da01ac9a85e89a906ee9c6922d7f4323e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 23 Sep 2011 13:24:35 +1000 Subject: [PATCH] Defensive Programming Task-number: QTBUG-21623 Change-Id: Ib906e6b50041d4e72034d6828d4dc7c503ec7bb4 Reviewed-on: http://codereview.qt-project.org/5426 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Jones --- src/declarative/particles/qsgparticlesystem.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/declarative/particles/qsgparticlesystem.cpp b/src/declarative/particles/qsgparticlesystem.cpp index 26c6d05..f886865 100644 --- a/src/declarative/particles/qsgparticlesystem.cpp +++ b/src/declarative/particles/qsgparticlesystem.cpp @@ -938,6 +938,9 @@ void QSGParticleSystem::particleStateChange(int idx) void QSGParticleSystem::moveGroups(QSGParticleData *d, int newGIdx) { + if (!d || newGIdx == d->group) + return; + QSGParticleData* pd = newDatum(newGIdx, false, d->systemIndex); pd->clone(*d); finishNewDatum(pd); -- 1.7.2.5