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:
authorBastien Montagne <bastien@blender.org>2020-07-09 12:44:11 +0300
committerBastien Montagne <bastien@blender.org>2020-07-09 12:46:28 +0300
commit8ddf7556a512b2b2ce89b75c9660e01a7aba8675 (patch)
treeaf98ecda886e9a12f65a30eba87357ea011eed8a /source/blender/makesrna/intern/rna_object.c
parentea5fe7abc183c1e53d327f97280f589499fe60bb (diff)
Fix T78718: Crash when deleting particle system modifier with the X Shortcut.
Duplication and deletion code of modifiers was totally wrong for particle system, that special weird thing needs its own custom management. Note that for now I chose not to duplicate the particle settings ID when duplicating the modifier...
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 089410ffd25..00d3a6e84b7 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1579,7 +1579,8 @@ static void rna_Object_modifier_remove(Object *object,
PointerRNA *md_ptr)
{
ModifierData *md = md_ptr->data;
- if (ED_object_modifier_remove(reports, CTX_data_main(C), object, md) == false) {
+ if (ED_object_modifier_remove(reports, CTX_data_main(C), CTX_data_scene(C), object, md) ==
+ false) {
/* error is already set */
return;
}
@@ -1591,7 +1592,7 @@ static void rna_Object_modifier_remove(Object *object,
static void rna_Object_modifier_clear(Object *object, bContext *C)
{
- ED_object_modifier_clear(CTX_data_main(C), object);
+ ED_object_modifier_clear(CTX_data_main(C), CTX_data_scene(C), object);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER | NA_REMOVED, object);
}