- glActiveTexture(chain->get_input_sampler(self, 0));
- check_error();
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- check_error();
+ if (chain->has_input_sampler(self, 0)) {
+ glActiveTexture(chain->get_input_sampler(self, 0));
+ check_error();
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ check_error();
+ }