diff options
Diffstat (limited to 'src/particles/qquickcustomaffector.cpp')
-rw-r--r-- | src/particles/qquickcustomaffector.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp index 09f8967045..583e3b6555 100644 --- a/src/particles/qquickcustomaffector.cpp +++ b/src/particles/qquickcustomaffector.cpp @@ -148,8 +148,9 @@ void QQuickCustomAffector::affectSystem(qreal dt) QV4::Scope scope(v4); QV4::Scoped<QV4::ArrayObject> array(scope, v4->newArrayObject(toAffect.size())); + QV4::ScopedValue v(scope); for (int i=0; i<toAffect.size(); i++) - array->putIndexed(i, toAffect[i]->v4Value().toValue()); + array->putIndexed(i, (v = toAffect[i]->v4Value().toValue())); if (dt >= simulationCutoff || dt <= simulationDelta) { affectProperties(toAffect, dt); |