X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=flat_input.h;h=bcaca50012facb2dcfb3d77879b11d99cac9a456;hb=4a0db319fc69dbada6270866b5ef9c638f3e653d;hp=b337788f4edaa328c1c5f1a00f2b6b4787ff6245;hpb=4f45f136fd2f652e923463189c5b8f74464a7268;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(); }