summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-06-24 05:02:06 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-06-24 05:02:06 (GMT)
commitdae81570298ea7b87a6a77766636eb4218fca457 (patch)
tree62c16adc4e9000dcd4e720de5f1312134461828f /src/declarative
parenta35490462c978f4659f0e20df2fe5438a603891e (diff)
downloadQt-dae81570298ea7b87a6a77766636eb4218fca457.zip
Qt-dae81570298ea7b87a6a77766636eb4218fca457.tar.gz
Qt-dae81570298ea7b87a6a77766636eb4218fca457.tar.bz2
Fix possible crash.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxflowview.cpp9
1 files 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();