Fix zero pointer access in renderer.

Change-Id: I185af453684c7223c0c9de103eb707d4918b8ae0
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Gunnar Sletta 2013-09-18 10:48:41 +02:00 committed by The Qt Project
parent ffaf39e9a7
commit 607f2db351
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ void Updater::visitTransformNode(Node *n)
QSGTransformNode *tn = static_cast<QSGTransformNode *>(n->sgNode);
if (n->isBatchRoot) {
if (m_added > 0 && m_roots.size() > 0)
if (m_added > 0 && m_roots.last())
renderer->registerBatchRoot(n, m_roots.last());
tn->setCombinedMatrix(m_rootMatrices.last() * *m_combined_matrix_stack.last() * tn->matrix());