[Bf-blender-cvs] [6eb5b418eee] master: Fix T56363: Blender crash when deleting a curve object.

Bastien Montagne noreply at git.blender.org
Tue Aug 14 14:06:55 CEST 2018


Commit: 6eb5b418eee8cb26ac0e3a8bb70cbaf706be4e4d
Author: Bastien Montagne
Date:   Tue Aug 14 14:05:09 2018 +0200
Branches: master
https://developer.blender.org/rB6eb5b418eee8cb26ac0e3a8bb70cbaf706be4e4d

Fix T56363: Blender crash when deleting a curve object.

Conversion code could leave object with inconsistent material data
compared to its new obdata.

Ideally, various conversion code would handle that properly, conserving
materials when possible, but for now at least ensure we get valid
result!

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

M	source/blender/editors/object/object_add.c

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

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index e977dea6140..8fc2d419c3c 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1903,6 +1903,9 @@ static int convert_exec(bContext *C, wmOperator *op)
 			continue;
 		}
 
+		/* Ensure new object has consistent material data with its new obdata. */
+		test_object_materials(bmain, newob, newob->data);
+
 		/* tag obdata if it was been changed */
 
 		/* If the original object is active then make this object active */



More information about the Bf-blender-cvs mailing list