Fix T45891: Crash generating previews
authorCampbell Barton <ideasman42@gmail.com>
Tue, 25 Aug 2015 08:33:04 +0000 (18:33 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 25 Aug 2015 08:34:44 +0000 (18:34 +1000)
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/object.c

index ae99ff1bbf3701accc79bf709c12be700baafe58..3f68339be11bea5bfd266b60079b2dab8e22fb02 100644 (file)
@@ -156,6 +156,7 @@ Group *BKE_group_copy(Group *group)
        BLI_duplicatelist(&groupn->gobject, &group->gobject);
 
        /* Do not copy group's preview (same behavior as for objects). */
+       groupn->preview = NULL;
 
        if (group->id.lib) {
                BKE_id_lib_local_paths(G.main, group->id.lib, &groupn->id);
index c7bcc49998511bc55ffc2c2126c50f0d24ee899d..0af7a3215a8c736aee58f1f9c6ade9e99143f2a1 100644 (file)
@@ -1562,6 +1562,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
        }
 
        /* Do not copy object's preview (mostly due to the fact renderers create temp copy of objects). */
+       obn->preview = NULL;
 
        return obn;
 }