Backport some fixes for erros found by PVS
parent
6579f2c9eb
commit
ad519596e7
|
@ -77,6 +77,14 @@ Body::~Body()
|
|||
|
||||
delete satellites;
|
||||
delete frameTree;
|
||||
|
||||
if (altSurfaces != NULL)
|
||||
{
|
||||
for (AltSurfaceTable::iterator iter = altSurfaces->begin(); iter != altSurfaces->end(); ++iter)
|
||||
delete iter->second;
|
||||
delete altSurfaces;
|
||||
}
|
||||
delete locations;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -926,6 +926,7 @@ static Image* LoadBMPImage(ifstream& in)
|
|||
}
|
||||
|
||||
delete[] pixels;
|
||||
delete palette;
|
||||
|
||||
return img;
|
||||
}
|
||||
|
|
|
@ -8403,7 +8403,7 @@ void Renderer::renderCometTail(const Body& body,
|
|||
}
|
||||
else
|
||||
{
|
||||
v0 = v1 = cometPoints[i] - cometPoints[i - 1];
|
||||
v0 = cometPoints[i] - cometPoints[i - 1];
|
||||
sectionLength = v0.length();
|
||||
v0.normalize();
|
||||
v1 = v0;
|
||||
|
|
|
@ -323,7 +323,7 @@ static int observer_goto(lua_State* l)
|
|||
double startInter = celx.safeGetNumber(4, WrongType, "Third arg to observer:goto must be a number", 0.25);
|
||||
double endInter = celx.safeGetNumber(5, WrongType, "Fourth arg to observer:goto must be a number", 0.75);
|
||||
if (startInter < 0 || startInter > 1) startInter = 0.25;
|
||||
if (endInter < 0 || endInter > 1) startInter = 0.75;
|
||||
if (endInter < 0 || endInter > 1) endInter = 0.75;
|
||||
|
||||
// The first argument may be either an object or a position
|
||||
if (sel != NULL)
|
||||
|
|
Loading…
Reference in New Issue