Fixed memory leak.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5667 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-07-07 21:50:32 +00:00
parent 1f7d07a3ae
commit 2b3eac1746

View File

@ -149,9 +149,6 @@ void RaceGUI::createMarkerTexture()
core::vector2df center((float)((m_marker_rendered_size>>1)+i*m_marker_rendered_size),
(float)(m_marker_rendered_size>>1) );
int count = kp->getShape();
//core::array<core::vector2df> vertices;
video::S3DVertex *vertices = new video::S3DVertex[count+1];
unsigned short int *index = new unsigned short int[count+1];
video::ITexture *t = kp->getMinimapIcon();
if(t)
{
@ -169,6 +166,8 @@ void RaceGUI::createMarkerTexture()
}
else // no special minimap icon defined
{
video::S3DVertex *vertices = new video::S3DVertex[count+1];
unsigned short int *index = new unsigned short int[count+1];
video::SColor color = kp->getColor();
createRegularPolygon(count, (float)radius, center, color,
vertices, index);