diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-25 22:10:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-25 22:10:20 +0300 |
commit | 8c3ecc9651f9b3eaa2eddd659e6299c7f4c0588b (patch) | |
tree | eafcbc4b619e7c1adbd849890b2f72374befe6d1 /source/blender/editors/space_view3d/drawobject.c | |
parent | 2b1cd24c6ebacb17032914c0897038cd7e63b07b (diff) |
Workaround for crash drawing face-maps after undo
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 5862438f4de..166a5cbbd17 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -9809,6 +9809,11 @@ void ED_draw_object_facemap(const bContext *C, Scene *scene, Object *ob, const f if (ob->type != OB_MESH || !ob->data) return; + /* Temporary, happens on undo, would resolve but will eventually move away from DM. */ + if (ob->derivedFinal == NULL) { + return; + } + dm = mesh_get_derived_final(&eval_ctx, scene, ob, CD_MASK_BAREMESH); if (!dm || !CustomData_has_layer(&dm->polyData, CD_FACEMAP)) return; |