aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llimage/llimageworker.cpp2
-rw-r--r--linden/indra/llimagej2coj/llimagej2coj.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/llimage/llimageworker.cpp b/linden/indra/llimage/llimageworker.cpp
index dc989e5..5e61f69 100644
--- a/linden/indra/llimage/llimageworker.cpp
+++ b/linden/indra/llimage/llimageworker.cpp
@@ -164,7 +164,7 @@ void LLImageDecodeThread::ImageRequest::finishRequest(bool completed)
164{ 164{
165 if (mResponder.notNull()) 165 if (mResponder.notNull())
166 { 166 {
167 bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux); 167 bool success = completed && mDecodedRaw && mDecodedImageRaw->getDataSize() && (!mNeedsAux || mDecodedAux);
168 mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux); 168 mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux);
169 } 169 }
170 // Will automatically be deleted 170 // Will automatically be deleted
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp
index b7a1b82..f003d60 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.cpp
+++ b/linden/indra/llimagej2coj/llimagej2coj.cpp
@@ -170,6 +170,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
170 if(!image) 170 if(!image)
171 { 171 {
172 LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image - no image" << LL_ENDL; 172 LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image - no image" << LL_ENDL;
173 base.decodeFailed();
173 return TRUE; // done 174 return TRUE; // done
174 } 175 }
175 176
@@ -183,6 +184,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
183 opj_image_destroy(image); 184 opj_image_destroy(image);
184 } 185 }
185 186
187 base.decodeFailed();
186 return TRUE; // done 188 return TRUE; // done
187 } 189 }
188 190
@@ -194,7 +196,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
194 // if we didn't get the discard level we're expecting, fail 196 // if we didn't get the discard level we're expecting, fail
195 if (image) //anyway somthing odd with the image, better check than crash 197 if (image) //anyway somthing odd with the image, better check than crash
196 opj_image_destroy(image); 198 opj_image_destroy(image);
197 base.mDecoding = FALSE; 199 base.decodeFailed();
198 return TRUE; 200 return TRUE;
199 } 201 }
200 } 202 }
@@ -207,6 +209,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
207 opj_image_destroy(image); 209 opj_image_destroy(image);
208 } 210 }
209 211
212 base.decodeFailed();
210 return TRUE; 213 return TRUE;
211 } 214 }
212 215
@@ -254,6 +257,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
254 llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl; 257 llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl;
255 opj_image_destroy(image); 258 opj_image_destroy(image);
256 259
260 base.decodeFailed();
257 return TRUE; // done 261 return TRUE; // done
258 } 262 }
259 } 263 }