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:
authorJacques Lucke <jacques@blender.org>2021-01-05 18:50:10 +0300
committerJacques Lucke <jacques@blender.org>2021-01-05 18:50:23 +0300
commit39f99fd05c353137130afd7fb101c9a78106d47b (patch)
treef3758e95e31d71ebd6d28f263e97bb14413702d4
parent9dbea1db66da5e277e8279811d66096751f38d29 (diff)
Fix: tried to set error message on modifier that does not exist
Without this, the example file in T83730 crashes in a debug build when deleting the hair edit bake in the particle settings.
-rw-r--r--source/blender/blenkernel/intern/pointcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 8ee8821eeb6..17434ee8023 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -653,7 +653,10 @@ static void ptcache_cloth_error(const ID *owner_id, void *cloth_v, const char *m
{
ClothModifierData *clmd = cloth_v;
BLI_assert(GS(owner_id->name) == ID_OB);
- BKE_modifier_set_error((Object *)owner_id, &clmd->modifier, "%s", message);
+ if (clmd->hairdata == NULL) {
+ /* If there is hair data, this modifier does not actually exist on the object. */
+ BKE_modifier_set_error((Object *)owner_id, &clmd->modifier, "%s", message);
+ }
}
static int ptcache_dynamicpaint_totpoint(void *sd, int UNUSED(cfra))