Add some parameter asserts in DitherEffect, too.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 20 Jan 2013 00:49:27 +0000 (01:49 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 20 Jan 2013 00:49:27 +0000 (01:49 +0100)
dither_effect.cpp

index 1399c81..305268e 100644 (file)
@@ -85,6 +85,10 @@ void DitherEffect::set_gl_state(GLuint glsl_program_num, const std::string &pref
 {
        Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
 
+       assert(width > 0);
+       assert(height > 0);
+       assert(num_bits > 0);
+
        if (width != last_width || height != last_height || num_bits != last_num_bits) {
                update_texture(glsl_program_num, prefix, sampler_num);
                last_width = width;