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/blenkernel/intern/pointcache.c
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/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 8c5915d3768..6b433e5edaa 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1848,7 +1848,7 @@ void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, Object *ob, RigidBodyWorld *r
memset(pid, 0, sizeof(PTCacheID));
- pid->owner_id = &ob->id;
+ pid->owner_id = ob != NULL ? &ob->id : NULL;
pid->calldata = rbw;
pid->type = PTCACHE_TYPE_RIGIDBODY;
pid->cache = rbw->shared->pointcache;