]> git.sesse.net Git - movit/blobdiff - flat_input.h
Fix an issue where a (cached) shader program could be used from multiple
[movit] / flat_input.h
index b337788f4edaa328c1c5f1a00f2b6b4787ff6245..bcaca50012facb2dcfb3d77879b11d99cac9a456 100644 (file)
@@ -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();
        }