Skip to content

Commit

Permalink
UPBGE: Fix unfreed mesh in KX_GameObject.
Browse files Browse the repository at this point in the history
When we changed the mesh client object(=KX_GameObject) to the
KX_ClientObject of the game object, we forgot to change it too for
RemoveFromBuckets, which created that none mesh was freed.
  • Loading branch information
youle31 committed Apr 23, 2016
1 parent 4bbf29e commit 976eb34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gameengine/Ketsji/KX_GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ void KX_GameObject::UpdateBuckets()
void KX_GameObject::RemoveMeshes()
{
for (size_t i=0;i<m_meshes.size();i++)
m_meshes[i]->RemoveFromBuckets(this);
m_meshes[i]->RemoveFromBuckets(m_pClient_info);
// Remove all mesh slots.
if (m_meshUser) {
delete m_meshUser;
Expand Down

0 comments on commit 976eb34

Please sign in to comment.