Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / node.c
index 82092fedbe3605836984addf2ac99980219d7104..0ec6d930e070323b962ab5fa148ef1eb46d8d14f 100644 (file)
@@ -1700,11 +1700,12 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
                        ntreeTexEndExecTree(ntree->execdata);
                        ntree->execdata = NULL;
                }
-               
-               if (node->typeinfo->freefunc)
-                       node->typeinfo->freefunc(node);
        }
-       
+
+       if (node->typeinfo->freefunc) {
+               node->typeinfo->freefunc(node);
+       }
+
        for (sock = node->inputs.first; sock; sock = nextsock) {
                nextsock = sock->next;
                node_socket_free(ntree, sock, node);