diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-15 14:50:51 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-15 14:53:16 +0300 |
commit | 26a72f0852a75535f8e4ea72100e735409b1407f (patch) | |
tree | 2bb331ff510bc6fca87a9c5021b55b5774470d32 /intern | |
parent | 2a7f8d3cb332055f026cd09933136d6981b585e7 (diff) |
Cycles: Fix after recent merge from master
random_id() crashes when there is no current dupli object.
We could also throw a Python error when doing it via RNA, but as far as
Cycles is concerned we need to check if instanced.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index ee153b8602d..986f0ccda68 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -295,7 +295,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter, persistent_id, b_ob, b_ob_instance, - b_dupli_iter->random_id(), + is_instance ? b_dupli_iter->random_id() : 0, tfm, use_portal); } |