[Bf-blender-cvs] [8c3ecc9651f] blender2.8: Workaround for crash drawing face-maps after undo

Campbell Barton noreply at git.blender.org
Tue Jul 25 20:57:21 CEST 2017


Commit: 8c3ecc9651f9b3eaa2eddd659e6299c7f4c0588b
Author: Campbell Barton
Date:   Wed Jul 26 05:10:20 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB8c3ecc9651f9b3eaa2eddd659e6299c7f4c0588b

Workaround for crash drawing face-maps after undo

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

M	source/blender/editors/space_view3d/drawobject.c

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

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;




More information about the Bf-blender-cvs mailing list