Fix null-pointer dereference invalid dimensioned shapes
PxPhysics::createShape() returns nullptr for an invalid PxGeometry (e.g.
a zero or negative SphereShape.diameter, BoxShape.extents component, or
CapsuleShape.diameter/height -- none of which are validated at the QML
property level). QPhysXActorBody::buildShapes() dereferenced the
result unconditionally, crashing on what can be an entirely ordinary
QML configuration (including values that only transiently hit zero via
a binding or animation). Skip the shape with a warning instead.
Mesh-based shapes (ConvexMeshShape/TriangleMeshShape/HeightFieldShape)
already guard against a failed/null underlying mesh in
QMeshShape::updatePhysXGeometry() and
QHeightFieldShape::updatePhysXGeometry(); this defect was specific to
the analytic primitive shapes, which skipped that validation step
entirely.
Adds a regression test with SphereShape/BoxShape/CapsuleShape given
zero or negative dimensions, asserting the world keeps simulating
instead of crashing.
Pick-to: 6.12 6.11 6.8
Change-Id: I6ab8777e8ad8dc4205a8dcae35cd5b9451a0f638
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>