Fix memory leak in legacy device
This commit is contained in:
parent
a1606f04d7
commit
8cae79b604
@ -2483,6 +2483,8 @@ void Track::handleSky(const XMLNode &xml_node, const std::string &filename)
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
for (unsigned int i = 0; i<v.size(); i++)
|
||||
{
|
||||
if (CVS->isGLSL())
|
||||
{
|
||||
video::IImage* img = getSkyTexture(v[i]);
|
||||
if (img)
|
||||
@ -2494,6 +2496,12 @@ void Track::handleSky(const XMLNode &xml_node, const std::string &filename)
|
||||
Log::error("track", "Sky-box spherical harmonics texture '%s' not found - ignored.",
|
||||
v[i].c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We only need m_spherical_harmonics_textures.size()
|
||||
m_spherical_harmonics_textures.push_back((void*)0x0);
|
||||
}
|
||||
} // for i<v.size()
|
||||
#endif // !SERVER_ONLY
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user