@@ -46,5 +46,6 @@ SelectiveChildNode(const SelectiveChildNode ©) :
////////////////////////////////////////////////////////////////////
INLINE void SelectiveChildNode::
select_child(int n) {
+ nassertv(n >= 0);
_selected_child = n;
}
@@ -54,6 +54,7 @@ SwitchNode(const string &name) :
INLINE void SwitchNode::
set_visible_child(int index) {
+ nassertv(index >= 0);
CDWriter cdata(_cycler);
cdata->_visible_child = index;