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>2014-01-23 22:16:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-23 22:18:22 +0400
commit0f72a8a7f0a0f8fff11ee26859c33ab684d6e19b (patch)
tree452b7e4cc8ed59c7e3fd2534343f6ba46574f1a7 /source/blender/blenkernel/intern/depsgraph.c
parent9f903208e800d4580314dc03d31e8ae5fea73cdb (diff)
Fix T38337: Crash when calling to_mesh() on a Curve object after clearing its parent
This is rather a workaround which only works because curve evaluation is only called for a temporary object. Not a big deal if we'll skip path creation for such objects. Still would need to think of general solution.
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index c6cfaaf2bcb..0e3a15b114e 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2959,7 +2959,19 @@ const char *DAG_get_node_name(void *node_v)
short DAG_get_eval_flags_for_object(struct Scene *scene, void *object)
{
- DagNode *node = dag_find_node(scene->theDag, object);;
+ DagNode *node;
+
+ if (scene->theDag == NULL) {
+ /* Happens when converting objects to mesh from a python script
+ * after modifying scene graph.
+ *
+ * Currently harmless because it's only called for temporary
+ * objects which are out of the DAG anyway.
+ */
+ return 0;
+ }
+
+ node = dag_find_node(scene->theDag, object);;
if (node) {
return node->eval_flags;