[Bf-blender-cvs] [f85b05111fa] blender2.8: Fix T59334: Crash initializing crazyspace on object with subsurf and displacement

Sergey Sharybin noreply at git.blender.org
Fri Dec 14 16:08:14 CET 2018


Commit: f85b05111fa4b96228a4a3969945c80fbb67f499
Author: Sergey Sharybin
Date:   Fri Dec 14 16:07:29 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBf85b05111fa4b96228a4a3969945c80fbb67f499

Fix T59334: Crash initializing crazyspace on object with subsurf and displacement

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

M	source/blender/modifiers/intern/MOD_util.c

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

diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index db6c58d468a..dca2d536a5d 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -50,6 +50,7 @@
 #include "BKE_lattice.h"
 #include "BKE_library.h"
 #include "BKE_mesh.h"
+#include "BKE_object.h"
 
 #include "BKE_modifier.h"
 
@@ -190,8 +191,9 @@ Mesh *MOD_deform_mesh_eval_get(
 		else {
 			/* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether
 			 * we really need a copy here. Maybe the CoW ob->data can be directly used. */
+			Mesh *mesh_prior_modifiers = BKE_object_get_pre_modified_mesh(ob);
 			BKE_id_copy_ex(
-			        NULL, ob->data, (ID **)&mesh,
+			        NULL, &mesh_prior_modifiers->id, (ID **)&mesh,
 			        (LIB_ID_CREATE_NO_MAIN |
 			         LIB_ID_CREATE_NO_USER_REFCOUNT |
 			         LIB_ID_CREATE_NO_DEG_TAG |



More information about the Bf-blender-cvs mailing list