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.
This commit is contained in:
		@@ -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);
 | 
			
		||||
  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))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user