From 9b9a2c002e3fa531d2adde40144b7afb88b07434 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 19 Jan 2013 23:54:43 +0100 Subject: [PATCH] Initialize pixel_data in FlatInput to NULL. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flat_input.cpp b/flat_input.cpp index a9d01a7..9cb9b9c 100644 --- a/flat_input.cpp +++ b/flat_input.cpp @@ -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); -- 2.39.2