summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/image/qpnghandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index ac78610..e942f4a 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -490,13 +490,13 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
return false;
}
- png_uint_32 width;
- png_uint_32 height;
- png_int_32 offset_x;
- png_int_32 offset_y;
- int bit_depth;
- int color_type;
- int unit_type;
+ png_uint_32 width = 0;
+ png_uint_32 height = 0;
+ png_int_32 offset_x = 0;
+ png_int_32 offset_y = 0;
+ int bit_depth = 0;
+ int color_type = 0;
+ int unit_type = PNG_OFFSET_PIXEL;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
0, 0, 0);
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, &unit_type);