Fixed potential crash in NodeTagIDChanged. Discovered after merge trunk
into tomato where there were no check for tree before calling this function. Old design worked fine with this. Mark some arguments as UNUSED.
This commit is contained in:
@@ -1534,13 +1534,15 @@ void NodeTagChanged(bNodeTree *ntree, bNode *node)
|
||||
|
||||
int NodeTagIDChanged(bNodeTree *ntree, ID *id)
|
||||
{
|
||||
bNodeTreeType *ntreetype = ntreeGetType(ntree->type);
|
||||
bNodeTreeType *ntreetype;
|
||||
bNode *node;
|
||||
int change = FALSE;
|
||||
|
||||
if(ELEM(NULL, id, ntree))
|
||||
return change;
|
||||
|
||||
ntreetype = ntreeGetType(ntree->type);
|
||||
|
||||
if (ntreetype->update_node) {
|
||||
for(node= ntree->nodes.first; node; node= node->next) {
|
||||
if(node->id==id) {
|
||||
|
||||
@@ -135,7 +135,7 @@ static void *group_initexec(bNode *node)
|
||||
return exec;
|
||||
}
|
||||
|
||||
static void group_freeexec(bNode *node, void *nodedata)
|
||||
static void group_freeexec(bNode *UNUSED(node), void *nodedata)
|
||||
{
|
||||
bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user