]> git.sesse.net Git - movit/commitdiff
Initialize pixel_data in FlatInput to NULL.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Jan 2013 22:54:43 +0000 (23:54 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Jan 2013 22:54:43 +0000 (23:54 +0100)
Doesn't matter in practice, but will cause cleaner crashes if people
forget to do set_pixel_data().

Found by Coverity Scan.

flat_input.cpp

index a9d01a72f920b2409849165df1efcb776eb1dada..9cb9b9c5b377f356f593346f18886ba19ef2d20f 100644 (file)
@@ -17,7 +17,8 @@ FlatInput::FlatInput(ImageFormat image_format, MovitPixelFormat pixel_format, GL
          needs_mipmaps(false),
          width(width),
          height(height),
-         pitch(width)
+         pitch(width),
+         pixel_data(NULL)
 {
        assert(type == GL_FLOAT || type == GL_UNSIGNED_BYTE);
        register_int("output_linear_gamma", &output_linear_gamma);