Fix for bug reported by Dalai Felinto on IRC, crash in blenderplayer after r56055. The ntreeUpdateTree function uses G.main, which is not defined in blenderplayer (NULL). Using G.main is in itself an ugly hack required for the node verification. Just added a sanity check for now.
This commit is contained in:
@@ -2885,7 +2885,8 @@ void ntreeUpdateTree(bNodeTree *ntree)
|
||||
ntreeInterfaceTypeUpdate(ntree);
|
||||
|
||||
/* XXX hack, should be done by depsgraph!! */
|
||||
ntreeVerifyNodes(G.main, &ntree->id);
|
||||
if (G.main)
|
||||
ntreeVerifyNodes(G.main, &ntree->id);
|
||||
|
||||
if (ntree->update & (NTREE_UPDATE_LINKS | NTREE_UPDATE_NODES)) {
|
||||
/* node updates can change sockets or links, repeat link pointer update afterward */
|
||||
|
||||
Reference in New Issue
Block a user