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