Fix #107420: crash getting PTCacheID when baking scene rigid body world #107536
|
@ -188,7 +188,8 @@ static PTCacheBaker *ptcache_baker_create(bContext *C, wmOperator *op, bool all)
|
|||
|
||||
if (!all) {
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
|
||||
Object *ob = (Object *)ptr.owner_id;
|
||||
ID *id = ptr.owner_id;
|
||||
Object *ob = (GS(id->name) == ID_OB) ? (Object *)id : NULL;
|
||||
PointCache *cache = ptr.data;
|
||||
baker->pid = BKE_ptcache_id_find(ob, baker->scene, cache);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue