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:
authorJoshua Leung <aligorith@gmail.com>2012-07-03 09:46:44 +0400
committerJoshua Leung <aligorith@gmail.com>2012-07-03 09:46:44 +0400
commit6a2a424c400f202358c9e930a46b1379f6e2a688 (patch)
tree3c154be89093cf7709d6a0cddae6a3fd44ba6aa0 /source/blender/blenkernel/intern/depsgraph.c
parentd58cb1beaa20ca7803a5adaf5ebb1e9ccfc79970 (diff)
Bugfix: Fix crashes with empty material slots
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 65d36d665db..79beb900306 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -622,8 +622,10 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
for (a = 1; a <= ob->totcol; a++) {
Material *ma = give_current_material(ob, a);
- /* recursively figure out if there are drivers, and hook these up to this object */
- dag_add_material_driver_relations(dag, node, ma);
+ if (ma) {
+ /* recursively figure out if there are drivers, and hook these up to this object */
+ dag_add_material_driver_relations(dag, node, ma);
+ }
}
}