From 083d9bd0a6a74c4eaca4a733c23bafcb7efd4ae7 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 13 Sep 2002 23:35:24 +0000 Subject: [PATCH] prevent core dump when 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 c4d8045cf7..2e303ea2f3 100644 --- a/panda/src/pgraph/nodePath.I +++ b/panda/src/pgraph/nodePath.I @@ -1018,7 +1018,10 @@ is_hidden(DrawMask camera_mask) const { INLINE bool NodePath:: unstash() { nassertr(!is_singleton(), false); - return get_parent().node()->unstash_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->unstash_child(this_node); } ////////////////////////////////////////////////////////////////////