Fix #35317: crash with boolean modifier using an object whose library linked

mesh datablock went missing.
This commit is contained in:
Brecht Van Lommel
2013-05-12 09:14:07 +00:00
parent cf96fdfc65
commit 698f1b5603
2 changed files with 3 additions and 3 deletions

View File

@@ -346,9 +346,9 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
BMOpSlot *slot_targetmap = NULL; /* for weldop */
/* need to avoid infinite recursion here */
if (amd->start_cap && amd->start_cap != ob)
if (amd->start_cap && amd->start_cap != ob && amd->start_cap->type == OB_MESH)
start_cap = mesh_get_derived_final(scene, amd->start_cap, CD_MASK_MESH);
if (amd->end_cap && amd->end_cap != ob)
if (amd->end_cap && amd->end_cap != ob && amd->end_cap->type == OB_MESH)
end_cap = mesh_get_derived_final(scene, amd->end_cap, CD_MASK_MESH);
unit_m4(offset);

View File

@@ -136,7 +136,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
* in other scenes when compositing */
if (bmd->object != ob) {
/* weak! - but we can too easy end up with circular dep crash otherwise */
if (modifiers_findByType(bmd->object, eModifierType_Boolean) == NULL) {
if (bmd->object->type == OB_MESH && modifiers_findByType(bmd->object, eModifierType_Boolean) == NULL) {
dm = mesh_get_derived_final(md->scene, bmd->object, CD_MASK_MESH);
}
else {