2
0
Эх сурвалжийг харах

Call MeshShapeSettings->Sanitize when creating the shape

Lucien Greathouse 4 сар өмнө
parent
commit
46998ac774
1 өөрчлөгдсөн 4 нэмэгдсэн , 0 устгасан
  1. 4 0
      JoltCImpl/JoltC.cpp

+ 4 - 0
JoltCImpl/JoltC.cpp

@@ -1450,6 +1450,10 @@ JPC_API bool JPC_MeshShapeSettings_Create(const JPC_MeshShapeSettings* self, JPC
 	JPH::MeshShapeSettings settings;
 	JPC_MeshShapeSettings_to_jph(self, &settings);
 
+	// MeshShapeSettings calls Sanitize in its default constructor, but we don't
+	// have constructors in C. It's probably fine to always Sanitize.
+	settings.Sanitize();
+
 	return HandleShapeResult(settings.Create(), outShape, outError);
 }