[Bf-blender-cvs] [0f72a8a] master: Fix T38337: Crash when calling to_mesh() on a Curve object after clearing its parent
Sergey Sharybin
noreply at git.blender.org
Thu Jan 23 19:18:32 CET 2014
Commit: 0f72a8a7f0a0f8fff11ee26859c33ab684d6e19b
Author: Sergey Sharybin
Date: Fri Jan 24 00:16:10 2014 +0600
https://developer.blender.org/rB0f72a8a7f0a0f8fff11ee26859c33ab684d6e19b
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.
===================================================================
M source/blender/blenkernel/intern/depsgraph.c
===================================================================
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index c6cfaaf..0e3a15b 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;
More information about the Bf-blender-cvs
mailing list