Free old textures on NodeBox resize

This commit is contained in:
rubenwardy 2015-05-10 17:30:00 +01:00
parent 2c2f3dbdf6
commit 0f152ab919

View File

@ -204,6 +204,9 @@ void NodeBox::buildNode(EditorState* editor, vector3di nd_position, IrrlichtDevi
}
ISceneManager* smgr = device->getSceneManager();
if (model) {
for (int i = 0; i < model->getMaterialCount(); i++)
driver->removeTexture(model->getMaterial(i).getTexture(0));
model->remove();
model = NULL;
}