From db7484513904f9d1ad748c959200d7c7ddd99eff Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 28 Mar 2011 18:03:51 +0000 Subject: [PATCH] fix crash with debug notify and NULL anim (untested, but trivial fix) --- panda/src/chan/movingPartBase.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/panda/src/chan/movingPartBase.cxx b/panda/src/chan/movingPartBase.cxx index 51c54462a2..3912deff76 100644 --- a/panda/src/chan/movingPartBase.cxx +++ b/panda/src/chan/movingPartBase.cxx @@ -267,9 +267,15 @@ bind_hierarchy(AnimGroup *anim, int channel_index, int &joint_index, } if (chan_cat.is_debug()) { - chan_cat.debug() - << "binding " << *this << " to " << *anim << ", is_included = " - << is_included << "\n"; + if (anim == (AnimGroup *)NULL) { + chan_cat.debug() + << "binding " << *this << " to NULL, is_included = " + << is_included << "\n"; + } else { + chan_cat.debug() + << "binding " << *this << " to " << *anim << ", is_included = " + << is_included << "\n"; + } } while ((int)_channels.size() <= channel_index) { _channels.push_back((AnimChannelBase*)NULL);