ListModel: Avoid crashes after items were removed
It is possible to remove items from the model while still keeping a
reference to them (obtained via get). Modifying properties of that
object would have crashed so far, due to the internal pointer being
null (as the actual model entry is gone).
Fix that by adding checks for the item being gone in virtualPut and
virtualGet.
Amends 90c55e859ea2
Fixes: QTBUG-151518
Initial-patch-by: Gašper Lah
Pick-to: 6.12 6.8
Change-Id: I9e0a196cc6aee2ea0efe6511a7962ef3f6e9f748
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>