diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-13 13:44:23 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-16 03:48:32 +0200 |
commit | a99671f7b83ed68dfac727ed0b09a8afaa1326c9 (patch) | |
tree | c4c10199d233137e21399550a39d2a9132ae32ba /src | |
parent | 5efcde65173f8bd349db37c7e3e57dc90ade7d24 (diff) |
Remove invalid ASSERT
There is a possibility for it to have been updated already if newDatums
are requested before emittersChanged is reached. This became possible
when emitters stopped having strict particle emission limits.
Change-Id: I45d1564f56547418127446e3138ff21deec891c3
Reviewed-on: http://codereview.qt-project.org/4753
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/particles/qsgparticlesystem.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/particles/qsgparticlesystem.cpp b/src/declarative/particles/qsgparticlesystem.cpp index bc27073142..7d70c3bd76 100644 --- a/src/declarative/particles/qsgparticlesystem.cpp +++ b/src/declarative/particles/qsgparticlesystem.cpp @@ -850,8 +850,11 @@ void QSGParticleSystem::emittersChanged() m_particle_count += m_groupData[i]->size(); } - Q_ASSERT(m_particle_count >= m_bySysIdx.size());//XXX when GC done right - m_bySysIdx.resize(m_particle_count); + if (m_debugMode) + qDebug() << "Particle system emitters changed. New particle count: " << m_particle_count; + + if (m_particle_count > m_bySysIdx.size())//New datum requests haven't updated it + m_bySysIdx.resize(m_particle_count); foreach (QSGParticlePainter *p, m_painters) loadPainter(p); @@ -859,8 +862,6 @@ void QSGParticleSystem::emittersChanged() if (!m_groups.isEmpty()) createEngine(); - if (m_debugMode) - qDebug() << "Particle system emitters changed. New particle count: " << m_particle_count; } void QSGParticleSystem::createEngine() |