From 9e776effe402e32595a71a003cacf0a4d90493cc Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Mon, 27 Nov 2017 23:09:57 -0800 Subject: [PATCH] Initialize TexInfo members. We rely on e.g. pixels being 'nullptr' to signal a missing texture. When it's a random pointer, things go poorly. --- src/Raw2Gltf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Raw2Gltf.cpp b/src/Raw2Gltf.cpp index 6cf5ffb..e0c730f 100644 --- a/src/Raw2Gltf.cpp +++ b/src/Raw2Gltf.cpp @@ -428,10 +428,10 @@ ModelData *Raw2Gltf( explicit TexInfo(int rawTexIx) : rawTexIx(rawTexIx) {} const int rawTexIx; - int width; - int height; - int channels; - uint8_t *pixels; + int width {}; + int height {}; + int channels {}; + uint8_t *pixels {}; }; int width = -1, height = -1;