Browse Source

Fixed a boundary condition

Josh Yelon 18 years ago
parent
commit
4c7101e1c4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/gobj/geomVertexArrayData.I

+ 3 - 0
panda/src/gobj/geomVertexArrayData.I

@@ -378,6 +378,9 @@ get_object() {
 INLINE const unsigned char *GeomVertexArrayDataHandle::
 INLINE const unsigned char *GeomVertexArrayDataHandle::
 get_pointer() const {
 get_pointer() const {
   check_resident();
   check_resident();
+  if (_cdata->_data.size() == 0) {
+    return NULL;
+  }
   return &_cdata->_data[0];
   return &_cdata->_data[0];
 }
 }