mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
gobj: fix crash printing out residency trackers
This commit is contained in:
parent
2d836697b0
commit
ccca3cca3a
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user