fix potential memory leak when manually loading a texture (pybullet.loadTexture), due to URDF/SDF texture caching (manually loading textures are not cached)

This commit is contained in:
erwincoumans
2017-11-09 11:09:07 -08:00
parent d6b3f735b6
commit b5bf70cb80

View File

@@ -1142,6 +1142,7 @@ int TinyRendererVisualShapeConverter::registerTexture(unsigned char* texels, int
texData.m_width = width;
texData.m_height = height;
texData.textureData1 = texels;
texData.m_isCached = false;
m_data->m_textures.push_back(texData);
return m_data->m_textures.size()-1;
}