diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-23 13:24:35 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-23 06:27:43 +0200 |
commit | 704b408da01ac9a85e89a906ee9c6922d7f4323e (patch) | |
tree | b6f92627c6030bd6fcc60c62ac95f84cfb0dbb95 | |
parent | 390d84237063ded93d2acd208e0f81efef388849 (diff) |
Defensive Programming
Task-number: QTBUG-21623
Change-Id: Ib906e6b50041d4e72034d6828d4dc7c503ec7bb4
Reviewed-on: http://codereview.qt-project.org/5426
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r-- | 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 26c6d05264..f88686595f 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); |