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:
Sergey Sharybin
2011-09-06 18:15:34 +00:00
parent decc2c2e77
commit 53671577a4
2 changed files with 4 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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;