Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-07 19:28:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-07 19:28:42 +0400
commit5455928262c7b2e99c8eb9be13665d819c4089d5 (patch)
tree3b6d913321ad02f392e55a4983227b1348884671 /source/blender/nodes/intern
parentc31ec62d2f5b33c46d54ddc982c0aed305c56a29 (diff)
Fix #35122: Blenderplayer crashes when loading level
Issue was caused by ntreeUpdateTree calling for a ntree which is not in G.main. This lead to issues in ntreeVerifyNodes (which is called from ntreeUpdateTree). Made is so ntreeUpdateTree now accepts main as an argument. Will work for the release, later we could either solve the TODO mentioned in ntreeUpdateTree which will eliminate need in main there or make it so context's main is used from all over where ntreeUpdateTree is called (currently there're still some usages of G.main).
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/node_exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 62a937b106c..de81ea61baa 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -36,6 +36,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BKE_global.h"
#include "BKE_node.h"
#include "MEM_guardedalloc.h"
@@ -157,7 +158,7 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
int totnodes, n;
/* ensure all sock->link pointers and node levels are correct */
- ntreeUpdateTree(ntree);
+ ntreeUpdateTree(G.main, ntree);
/* get a dependency-sorted list of nodes */
ntreeGetDependencyList(ntree, &nodelist, &totnodes);