mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
disallow negative indices for SwitchNode
This commit is contained in:
parent
a8519d5f0b
commit
4603b5f652
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user