Browse Source

protect output

David Rose 19 years ago
parent
commit
1bf44ee2d7
1 changed files with 6 additions and 1 deletions
  1. 6 1
      panda/src/char/characterJointEffect.cxx

+ 6 - 1
panda/src/char/characterJointEffect.cxx

@@ -103,7 +103,12 @@ safe_to_combine() const {
 ////////////////////////////////////////////////////////////////////
 void CharacterJointEffect::
 output(ostream &out) const {
-  out << get_type() << "(" << _character->get_name() << ")";
+  out << get_type();
+  if (_character.is_valid_pointer()) {
+    out << "(" << _character->get_name() << ")";
+  } else {
+    out << "(**invalid**)";
+  }
 }
 
 ////////////////////////////////////////////////////////////////////