Skip to content
Permalink
Browse files

gobj: fix crash printing out residency trackers

  • Loading branch information
rdb committed Nov 10, 2019
1 parent 2d83669 commit ccca3cca3aa9fd26aff982bf6f3d6d3ff3d19c55
Showing with 14 additions and 2 deletions.
  1. +7 −1 panda/src/gobj/indexBufferContext.cxx
  2. +7 −1 panda/src/gobj/vertexBufferContext.cxx
@@ -20,7 +20,13 @@ TypeHandle IndexBufferContext::_type_handle;
*/
void IndexBufferContext::
output(std::ostream &out) const {
out << *get_data() << ", " << get_data_size_bytes();
GeomPrimitive *prim = get_data();
if (prim != nullptr) {
out << *prim;
} else {
out << "NULL";
}
out << ", " << get_data_size_bytes();
}

/**
@@ -21,7 +21,13 @@ TypeHandle VertexBufferContext::_type_handle;
*/
void VertexBufferContext::
output(std::ostream &out) const {
out << *get_data() << ", " << get_data_size_bytes();
GeomVertexArrayData *data = get_data();
if (data != nullptr) {
out << *data;
} else {
out << "NULL";
}
out << ", " << get_data_size_bytes();
}

/**

0 comments on commit ccca3cc

Please sign in to comment.
You can’t perform that action at this time.