mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
can't query TypeHandle::none() pointers
This commit is contained in:
parent
369f93951f
commit
0ce0196027
@ -96,7 +96,7 @@ show() const {
|
||||
for (vi = count_sorter.begin(); vi != count_sorter.end(); ++vi) {
|
||||
TypeHandle type = (*vi)._type;
|
||||
if (type == TypeHandle::none()) {
|
||||
nout << "undefined type (TypeHandle::none())";
|
||||
nout << "unknown";
|
||||
} else {
|
||||
nout << type;
|
||||
}
|
||||
@ -850,11 +850,7 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) {
|
||||
if (info->_freeze_index == _freeze_index &&
|
||||
info->_ref_ptr != (ReferenceCount *)NULL) {
|
||||
TypeHandle info_type = info->get_type();
|
||||
if (type == TypeHandle::none() &&
|
||||
info_type == TypeHandle::none()) {
|
||||
result.add_entry(info->_ref_ptr, info->_typed_ptr, info_type,
|
||||
now - info->_time);
|
||||
} else if (info_type != TypeHandle::none() &&
|
||||
if (info_type != TypeHandle::none() &&
|
||||
info_type.is_derived_from(type)) {
|
||||
result.add_entry(info->_ref_ptr, info->_typed_ptr, info_type,
|
||||
now - info->_time);
|
||||
|
@ -239,7 +239,7 @@ output(ostream &out) const {
|
||||
void MemoryUsagePointers::
|
||||
add_entry(ReferenceCount *ref_ptr, TypedObject *typed_ptr,
|
||||
TypeHandle type, double age) {
|
||||
// We can't safly add pointers with a zero reference count. They
|
||||
// We can't safely add pointers with a zero reference count. They
|
||||
// might be statically-allocated or something, and if we try to add
|
||||
// them they'll try to destruct when the PointerTo later goes away.
|
||||
if (ref_ptr->get_ref_count() != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user