From 8289b2c1c6281de78c2634dda1c04006616e6311 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 18 Nov 2010 18:53:49 -0600 Subject: [PATCH] Imprudence patch dragged in some regression. --- indra/llimagej2coj/llimagej2coj.cpp | 3 +-- indra/llimagej2coj/llimagej2coj.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index fd923703d..455cd48ff 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -99,7 +99,6 @@ void info_callback(const char* msg, void*) LLImageJ2COJ::LLImageJ2COJ() : LLImageJ2CImpl() { - mRawImagep=NULL; } @@ -350,7 +349,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con OPJ_COLOR_SPACE color_space = CLRSPC_SRGB; opj_image_cmptparm_t cmptparm[MAX_COMPS]; opj_image_t * image = NULL; - S32 numcomps = raw_image.getComponents(); + S32 numcomps = llmin((S32)raw_image.getComponents(),(S32)MAX_COMPS); S32 width = raw_image.getWidth(); S32 height = raw_image.getHeight(); diff --git a/indra/llimagej2coj/llimagej2coj.h b/indra/llimagej2coj/llimagej2coj.h index 73cb074f1..3995f6674 100644 --- a/indra/llimagej2coj/llimagej2coj.h +++ b/indra/llimagej2coj/llimagej2coj.h @@ -52,8 +52,6 @@ protected: return (a + (1 << b) - 1) >> b; } - // Temporary variables for in-progress decodes... - LLImageRaw *mRawImagep; }; #endif