goat3d

diff src/node.cc @ 56:ca549434dc95

fixed a crashing bug in anm_destroy_node introduced when I added the multiple animations per node
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 23 Jan 2014 02:50:54 +0200
parents 498ca7ac7047
children 99715321ad6d
line diff
     1.1 --- a/src/node.cc	Sun Jan 19 14:56:44 2014 +0200
     1.2 +++ b/src/node.cc	Thu Jan 23 02:50:54 2014 +0200
     1.3 @@ -26,6 +26,8 @@
     1.4  
     1.5  void g3dimpl::delete_node_tree(Node *n)
     1.6  {
     1.7 +	if(!n) return;
     1.8 +
     1.9  	for(int i=0; i<n->get_children_count(); i++) {
    1.10  		delete_node_tree((Node*)n->get_child(i));
    1.11  	}