Skip to content

Commit

Permalink
UPBGE: Fix uninitialized polygon centers.
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Oct 30, 2017
1 parent 8a78945 commit f2ab1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gameengine/Rasterizer/RAS_IDisplayArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void RAS_IDisplayArray::SortPolygons(const MT_Transform& transform, unsigned int
const MT_Vector3 pnorm(transform.getBasis()[2]);

if (m_polygonCenters.size() != totpoly) {
m_polygonCenters.resize(totpoly);
m_polygonCenters.resize(totpoly, MT_Vector3(0.0f, 0.0f, 0.0f));
for (unsigned int i = 0; i < totpoly; ++i) {
// Compute polygon center.
MT_Vector3& center = m_polygonCenters[i];
Expand Down

0 comments on commit f2ab1c6

Please sign in to comment.