Commit a1867e5c authored by Alan Alpert's avatar Alan Alpert Committed by Qt by Nokia
Browse files

Crash less

Can't run any particles without a system set. Just skip the
'prepareFrame' function in that case.

Task-Number: QTBUG-20386
Change-Id: I22332636084d1696d5aff5386a5ca4ff0f2f1866
Reviewed-on: http://codereview.qt.nokia.com/1680


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarMartin Jones <martin.jones@nokia.com>
parent 522f0f92
No related merge requests found
Showing with 4 additions and 0 deletions
......@@ -165,6 +165,8 @@ QSGNode* QSGItemParticle::updatePaintNode(QSGNode* n, UpdatePaintNodeData* d)
void QSGItemParticle::prepareNextFrame()
{
if (!m_system)
return;
qint64 timeStamp = m_system->systemSync(this);
qreal curT = timeStamp/1000.0;
qreal dt = curT - m_lastT;
......
......@@ -227,6 +227,8 @@ QSGNode* QSGModelParticle::updatePaintNode(QSGNode* n, UpdatePaintNodeData* d)
void QSGModelParticle::prepareNextFrame()
{
if (!m_system)
return;
qint64 timeStamp = m_system->systemSync(this);
qreal curT = timeStamp/1000.0;
qreal dt = curT - m_lastT;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment