Skip to content
Snippets Groups Projects
Commit ff3f38fa authored by terlemez's avatar terlemez
Browse files

fixed a bug, where certain Collada files caused an assertion

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@694 042f3d55-54a8-47e9-b7fb-15903f145c44
parent a1bb17dd
No related branches found
No related tags found
No related merge requests found
......@@ -53,9 +53,12 @@ void addTransform(SoGroup* root, pugi::xml_node node){
}
}
InventorRobotNode::InventorRobotNode(){}
InventorRobotNode::InventorRobotNode(){
m_bOwn=false;
}
InventorRobotNode::InventorRobotNode(SoSeparator *_root){
m_bOwn=true;
visualization = new SoSeparator;
visualization->ref();
preJointTransformation = new SoGroup;
......@@ -66,8 +69,10 @@ InventorRobotNode::InventorRobotNode(SoSeparator *_root){
}
InventorRobotNode::~InventorRobotNode(){
visualization->unref();
collisionModel->unref();
if (m_bOwn) {
visualization->unref();
collisionModel->unref();
}
}
void InventorRobotNode::visualizeBoundingBox()
......
......@@ -15,6 +15,8 @@ namespace Collada {
~InventorRobotNode();
void visualizeBoundingBox();
virtual void initialize();
private:
bool m_bOwn;
};
// Adds a <instance_geometry_node> directly to a SoSeparator.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment