diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-19 10:50:07 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-19 10:50:07 +0400 |
commit | 9f8c3783cdca2e145a8a8b9e2bddf53147ff83ee (patch) | |
tree | 0d3b8f23466dd05432ecdc2e179ee5233db88700 /source/blender/blenkernel/intern | |
parent | 5aef06fc04ef0b83506cd15816eb170a63f08ebb (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 954bb419ea7..a62bfebed45 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -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 */ |