Quellcode durchsuchen

Bugfix: Forgot to free a temporary allocation on an early out in HeightFieldShape::SetMaterials

Jorrit Rouwe vor 1 Jahr
Ursprung
Commit
f4f8e61f4b
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      Jolt/Physics/Collision/Shape/HeightFieldShape.cpp

+ 1 - 0
Jolt/Physics/Collision/Shape/HeightFieldShape.cpp

@@ -1264,6 +1264,7 @@ bool HeightFieldShape::SetMaterials(uint inX, uint inY, uint inSizeX, uint inSiz
 	if (mMaterials.size() == 1)
 	{
 		// Only 1 material, we don't need to store the material indices
+		inAllocator.Free(material_remap_table, material_remap_table_size);
 		return true;
 	}