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:
authorSebastian Parborg <darkdefende@gmail.com>2020-09-09 12:46:40 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-09-09 12:48:52 +0300
commitd51c8f78ff8a210675dae44048156c23e3793508 (patch)
tree809aa4e321f5771d46aad901a2a1804dd31b0aca /source/blender/editors/object
parent377a1e3d7b7f108c5feff24dc2adb5ef7c402989 (diff)
Fix T80596: Convert to Curve from Mesh crashes Blender
The point cache code needs a non NULL rbw pointer. This could have been avoided if there was a sanity check in the convert function, so added a check there as well.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index bfb13fb99bf..482ae4019c3 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2572,7 +2572,9 @@ static int object_convert_exec(bContext *C, wmOperator *op)
if (newob->type == OB_CURVE) {
BKE_object_free_modifiers(newob, 0); /* after derivedmesh calls! */
- ED_rigidbody_object_remove(bmain, scene, newob);
+ if (newob->rigidbody_object != NULL) {
+ ED_rigidbody_object_remove(bmain, scene, newob);
+ }
}
}
else if (ob->type == OB_MESH && target == OB_GPENCIL) {