X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=flat_input.h;h=bcaca50012facb2dcfb3d77879b11d99cac9a456;hb=29dbee6d7375145fda1346dbd2531017c9ce8e1e;hp=b337788f4edaa328c1c5f1a00f2b6b4787ff6245;hpb=9c6b86affb570a2e2d18c6da795c359da393f9a3;p=movit diff --git a/flat_input.h b/flat_input.h index b337788..bcaca50 100644 --- a/flat_input.h +++ b/flat_input.h @@ -109,17 +109,20 @@ public: // you will need to re-set it after this call. void set_width(unsigned width) { + assert(width != 0); this->pitch = this->width = width; invalidate_pixel_data(); } void set_height(unsigned height) { + assert(height != 0); this->height = height; invalidate_pixel_data(); } void set_pitch(unsigned pitch) { + assert(pitch != 0); this->pitch = pitch; invalidate_pixel_data(); }