From: Steinar H. Gunderson Date: Sun, 20 Jan 2013 00:49:27 +0000 (+0100) Subject: Add some parameter asserts in DitherEffect, too. X-Git-Tag: 1.0~153 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=a27be9dd53b8bd14fe7bf8896e8459dcab297119 Add some parameter asserts in DitherEffect, too. --- diff --git a/dither_effect.cpp b/dither_effect.cpp index 1399c81..305268e 100644 --- a/dither_effect.cpp +++ b/dither_effect.cpp @@ -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;