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!
This commit is contained in:
Bastien Montagne
2018-08-14 14:05:09 +02:00
parent 932251caea
commit 6eb5b418ee

View File

@@ -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 */