From c3e20f1a704409c35b444007e2ba6f64d2a8685e Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 13 Sep 2002 23:49:04 +0000 Subject: [PATCH] don't crash if assertion fails --- panda/src/pgraph/nodePath.I | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/nodePath.I b/panda/src/pgraph/nodePath.I index 2e303ea2f3..c09c154818 100644 --- a/panda/src/pgraph/nodePath.I +++ b/panda/src/pgraph/nodePath.I @@ -1045,7 +1045,10 @@ unstash() { INLINE bool NodePath:: stash() { nassertr(!is_singleton(), false); - return get_parent().node()->stash_child(node()); + PandaNode *parent_node = get_parent().node(); + PandaNode *this_node = node(); + nassertr(parent_node != (PandaNode *)NULL && this_node != (PandaNode *)NULL, false); + return parent_node->stash_child(this_node); } ////////////////////////////////////////////////////////////////////