Fix assert when a VisualDataModels context has been invalidated.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Thu, 23 Aug 2012 04:20:47 +0000 (14:20 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 24 Aug 2012 00:52:30 +0000 (02:52 +0200)
commit19e14d8e2aceb449d3788313165bd371be714a24
tree665d7bbe27645d254cf775c7fb257dfcae0c9313
parent0853343c33e394f35c31c161b019b2aed17f9256
Fix assert when a VisualDataModels context has been invalidated.

Verify the context is valid before attempting to access its engine. The
context should normally be valid but there is a small window between
a delegate item being released and the DeferredDelete event being
processed when it is not.

Task-number: QTBUG-26949
Change-Id: I79f3affaed8904cbe0974476010b68305666cd29
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/quick/items/qquickvisualdatamodel.cpp
tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp