From a27be9dd53b8bd14fe7bf8896e8459dcab297119 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 20 Jan 2013 01:49:27 +0100 Subject: [PATCH] Add some parameter asserts in DitherEffect, too. --- dither_effect.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.2