mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 02:17:05 +00:00
When deleting a Model::HierNode reset the _parent of the _child.
Fixes some memory corruption when deleting costumes.
This commit is contained in:
parent
179dfccf37
commit
8323ad6f3a
@ -213,6 +213,11 @@ Model::Face::~Face() {
|
||||
delete[] _texVertices;
|
||||
}
|
||||
|
||||
Model::HierNode::~HierNode() {
|
||||
if (_child)
|
||||
_child->_parent = NULL;
|
||||
}
|
||||
|
||||
void Model::HierNode::loadBinary(const char *&data, Model::HierNode *hierNodes, const Geoset *g) {
|
||||
memcpy(_name, data, 64);
|
||||
_flags = READ_LE_UINT32(data + 64);
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
struct Mesh;
|
||||
struct HierNode {
|
||||
HierNode() : _initialized(false) { }
|
||||
~HierNode();
|
||||
void loadBinary(const char *&data, HierNode *hierNodes, const Geoset *g);
|
||||
void draw() const;
|
||||
void addChild(HierNode *child);
|
||||
|
Loading…
x
Reference in New Issue
Block a user