Browse Source

bullet: fix issue with result of get_contact() going out of scope

rdb 9 years ago
parent
commit
32b4273c94

+ 1 - 1
panda/src/bullet/bulletContactResult.I

@@ -86,7 +86,7 @@ get_num_contacts() const {
 /**
 /**
  *
  *
  */
  */
-INLINE BulletContact &BulletContactResult::
+INLINE BulletContact BulletContactResult::
 get_contact(int idx) {
 get_contact(int idx) {
 
 
   nassertr(idx >= 0 && idx < (int)_contacts.size(), _empty);
   nassertr(idx >= 0 && idx < (int)_contacts.size(), _empty);

+ 1 - 1
panda/src/bullet/bulletContactResult.h

@@ -62,7 +62,7 @@ struct EXPCL_PANDABULLET BulletContactResult : public btCollisionWorld::ContactR
 
 
 PUBLISHED:
 PUBLISHED:
   INLINE int get_num_contacts() const;
   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);
   MAKE_SEQ(get_contacts, get_num_contacts, get_contact);
 
 
 public:
 public: