mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Fixed an out-of-bounds error
This commit is contained in:
parent
ea17cc3fc0
commit
e5f03b6bf5
@ -359,6 +359,9 @@ update_shader_texture_bindings(CLP(ShaderContext) *prev, GSG *gsg)
|
|||||||
const ShaderInput *input = gsg->_target._shader->get_input(id);
|
const ShaderInput *input = gsg->_target._shader->get_input(id);
|
||||||
tex = input->get_texture();
|
tex = input->get_texture();
|
||||||
} else {
|
} else {
|
||||||
|
if (_cg_texbind[i].stage >= gsg->_target._texture->get_num_on_stages()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TextureStage *stage = gsg->_target._texture->get_on_stage(_cg_texbind[i].stage);
|
TextureStage *stage = gsg->_target._texture->get_on_stage(_cg_texbind[i].stage);
|
||||||
tex = gsg->_target._texture->get_on_texture(stage);
|
tex = gsg->_target._texture->get_on_texture(stage);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user