From 32b4273c947ecccf341d641c1350d9ea0854906f Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 18 Apr 2016 23:57:02 +0200 Subject: [PATCH] bullet: fix issue with result of get_contact() going out of scope --- panda/src/bullet/bulletContactResult.I | 2 +- panda/src/bullet/bulletContactResult.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/bullet/bulletContactResult.I b/panda/src/bullet/bulletContactResult.I index 5509f35092..9299631374 100644 --- a/panda/src/bullet/bulletContactResult.I +++ b/panda/src/bullet/bulletContactResult.I @@ -86,7 +86,7 @@ get_num_contacts() const { /** * */ -INLINE BulletContact &BulletContactResult:: +INLINE BulletContact BulletContactResult:: get_contact(int idx) { nassertr(idx >= 0 && idx < (int)_contacts.size(), _empty); diff --git a/panda/src/bullet/bulletContactResult.h b/panda/src/bullet/bulletContactResult.h index 77ada41468..3e0e216135 100644 --- a/panda/src/bullet/bulletContactResult.h +++ b/panda/src/bullet/bulletContactResult.h @@ -62,7 +62,7 @@ struct EXPCL_PANDABULLET BulletContactResult : public btCollisionWorld::ContactR PUBLISHED: INLINE int get_num_contacts() const; - INLINE BulletContact &get_contact(int idx); + INLINE BulletContact get_contact(int idx); MAKE_SEQ(get_contacts, get_num_contacts, get_contact); public: