From 4890660acfc55db4e4e79375d562e729935092bd Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 23 Oct 2009 12:45:20 +1000 Subject: Don't call qDrawPixmaps if there are no particles to paint. --- src/declarative/extra/qfxparticles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp index 36fdd79..8e77c34 100644 --- a/src/declarative/extra/qfxparticles.cpp +++ b/src/declarative/extra/qfxparticles.cpp @@ -1098,7 +1098,7 @@ void QFxParticles::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget void QFxParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { - if (d->image.isNull()) + if (d->image.isNull() || d->particles.isEmpty()) return; const int myX = x() + parentItem()->x(); -- cgit v0.12