Keep from setting invalid shaders (missing shader files, shaders that did not compile, ...)

This commit is contained in:
aignacio_sf 2006-02-10 21:09:44 +00:00
parent 78b83fa797
commit 2da70352f4

View File

@ -2798,7 +2798,7 @@ do_issue_shader() {
context = (CLP(ShaderContext) *)(expansion->prepare_now(get_prepared_objects(), this)); context = (CLP(ShaderContext) *)(expansion->prepare_now(get_prepared_objects(), this));
} }
if (context == 0) { if (context == 0 || (context && context -> valid ( ) == false)) {
if (_current_shader_context != 0) { if (_current_shader_context != 0) {
_current_shader_context->unbind(); _current_shader_context->unbind();
_current_shader_expansion = 0; _current_shader_expansion = 0;