From dae81570298ea7b87a6a77766636eb4218fca457 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 24 Jun 2009 15:02:06 +1000 Subject: Fix possible crash. --- src/declarative/fx/qfxflowview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/declarative/fx/qfxflowview.cpp b/src/declarative/fx/qfxflowview.cpp index e02e186..77cd6df 100644 --- a/src/declarative/fx/qfxflowview.cpp +++ b/src/declarative/fx/qfxflowview.cpp @@ -128,10 +128,11 @@ void QFxFlowView::refresh() { if (m_model && m_columns >= 1) { for (int ii = 0; ii < m_model->count(); ++ii) { - QFxItem *item = m_model->item(ii); - item->setParent(this); - item->setZ(0); - m_items << item; + if (QFxItem *item = m_model->item(ii)) { + item->setParent(this); + item->setZ(0); + m_items << item; + } } reflow(); -- cgit v0.12