Commit: 961927572956eab83ce6f99ad1f5bc5ec0987f7e
Author: Campbell Barton
Date:   Tue May 16 18:47:43 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB961927572956eab83ce6f99ad1f5bc5ec0987f7e

Correct last commit, missing assignment

===================================================================

M       source/blender/draw/modes/sculpt_mode.c

===================================================================

diff --git a/source/blender/draw/modes/sculpt_mode.c 
b/source/blender/draw/modes/sculpt_mode.c
index b55e3236ed9..7bbf551bcd9 100644
--- a/source/blender/draw/modes/sculpt_mode.c
+++ b/source/blender/draw/modes/sculpt_mode.c
@@ -194,11 +194,10 @@ static void SCULPT_cache_populate(void *vedata, Object 
*ob)
                SceneLayer *sl = draw_ctx->sl;
 
                if (ob->sculpt && ob == OBACT_NEW) {
-                       PBVH *pbvh = ob->sculpt->pbvh;
 
                        /* XXX, needed for dyntopo-undo (which clears).
                         * probably depsgraph should handlle? in 2.7x getting 
derived-mesh does this (mesh_build_data) */
-                       if (pbvh == NULL) {
+                       if (ob->sculpt->pbvh == NULL) {
                                /* create PBVH immediately (would be created on 
the fly too,
                                 * but this avoids waiting on first stroke) */
                                Scene *scene = draw_ctx->scene;
@@ -206,6 +205,7 @@ static void SCULPT_cache_populate(void *vedata, Object *ob)
                                BKE_sculpt_update_mesh_elements(scene, 
scene->toolsettings->sculpt, ob, false, false);
                        }
 
+                       PBVH *pbvh = ob->sculpt->pbvh;
                        if (pbvh && pbvh_has_mask(pbvh)) {
                                /* Get geometry cache */
                                DRWShadingGroup *shgroup = object_is_flat(ob) ? 
stl->g_data->group_flat : stl->g_data->group_smooth;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to