diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-04-27 03:56:53 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-04-27 03:56:53 (GMT) |
commit | c818abd743a6877aa27ded1a01d5f8fd498cc116 (patch) | |
tree | c38167a988e539b48d718692c95a0b87c1c61570 /src/declarative/fx/qfxpathview.cpp | |
parent | 35bf64817a3af2f4df2fb7669eb830b25fcc672c (diff) | |
download | Qt-c818abd743a6877aa27ded1a01d5f8fd498cc116.zip Qt-c818abd743a6877aa27ded1a01d5f8fd498cc116.tar.gz Qt-c818abd743a6877aa27ded1a01d5f8fd498cc116.tar.bz2 |
Fix crash in PathView.
If a component had runtime errors it could cause PathView to crash. Now
we check in rengenerate to make sure the model actually returns an item
before using it.
Diffstat (limited to 'src/declarative/fx/qfxpathview.cpp')
-rw-r--r-- | src/declarative/fx/qfxpathview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index f2a9065..b1cfaa5 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -594,6 +594,8 @@ void QFxPathViewPrivate::regenerate() int minI = -1; for(int i=0; i<numItems; i++){ QFxItem *item = model->item(i); + if (!item) + return; items.append(item); item->setZ(i); item->setParent(q); |