diff --git a/model.cpp b/model.cpp index bb5dbd0..8d5f46a 100755 --- a/model.cpp +++ b/model.cpp @@ -32,10 +32,8 @@ namespace vb01{ getDescendants(descendants); for(Node *node : descendants) - for(Mesh *mesh : node->getMeshes()){ - delete mesh->getMaterial(); + for(Mesh *mesh : node->getMeshes()) mesh->setMaterial(nullptr); - } while(!children.empty()){ Node *c = children[children.size() - 1];