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:
Lukas Toenne
2013-04-19 06:50:07 +00:00
parent 5aef06fc04
commit 9f8c3783cd

View File

@@ -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 */