Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_datatransfer.c')
-rw-r--r--source/blender/modifiers/intern/MOD_datatransfer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index c994a680fb0..fa60bd2a502 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -141,9 +141,14 @@ static bool isDisabled(const struct Scene *UNUSED(scene),
ModifierData *md,
bool UNUSED(useRenderParams))
{
- DataTransferModifierData *dtmd = (DataTransferModifierData *)md;
/* If no source object, bypass. */
- return (dtmd->ob_source == NULL);
+ DataTransferModifierData *dtmd = (DataTransferModifierData *)md;
+ /* The object type check is only needed here in case we have a placeholder
+ * object assigned (because the library containing the mesh is missing).
+ *
+ * In other cases it should be impossible to have a type missmatch.
+ */
+ return !dtmd->ob_source || dtmd->ob_source->type != OB_MESH;
}
#define HIGH_POLY_WARNING 10000