mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
try to defend against hard crashes
This commit is contained in:
parent
38b537b0f5
commit
89950a2132
@ -384,7 +384,7 @@ get_num_children(Thread *current_thread) const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE NodePath NodePath::
|
INLINE NodePath NodePath::
|
||||||
get_child(int n, Thread *current_thread) const {
|
get_child(int n, Thread *current_thread) const {
|
||||||
nassertr(n >= 0 && n < get_num_children(current_thread), NodePath());
|
nassertr_always(n >= 0 && n < get_num_children(current_thread), NodePath());
|
||||||
NodePath child;
|
NodePath child;
|
||||||
int pipeline_stage = current_thread->get_pipeline_stage();
|
int pipeline_stage = current_thread->get_pipeline_stage();
|
||||||
child._head = PandaNode::get_component(_head, _head->get_node()->get_child(n, current_thread),
|
child._head = PandaNode::get_component(_head, _head->get_node()->get_child(n, current_thread),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user