From 6626ed1a89e13e0e6f6b5a526e9f97fbb8e67b8f Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 15 Jun 2022 15:17:51 -0700 Subject: [PATCH] Initialize vertexSource Default constructor of btVector3 does not initialize the object. This fixes Memory Sanitizer reports. --- src/LinearMath/btConvexHull.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LinearMath/btConvexHull.cpp b/src/LinearMath/btConvexHull.cpp index e7de2a369..94b68baf5 100644 --- a/src/LinearMath/btConvexHull.cpp +++ b/src/LinearMath/btConvexHull.cpp @@ -678,7 +678,9 @@ HullError HullLibrary::CreateConvexHull(const HullDesc &desc, // describes the if (vcount < 8) vcount = 8; btAlignedObjectArray vertexSource; - vertexSource.resize(static_cast(vcount)); + btVector3 zero; + zero.setZero(); + vertexSource.resize(static_cast(vcount), zero); btVector3 scale;