diff -r 68ad362920c1 indra/llimage/llimage.cpp --- a/indra/llimage/llimage.cpp Wed Jul 06 15:31:36 2011 -0400 +++ b/indra/llimage/llimage.cpp Tue Jul 12 13:01:35 2011 -0700 @@ -167,10 +167,15 @@ { deleteData(); // virtual mBadBufferAllocation = false ; - mData = new U8[size]; - if (!mData) + try { - llwarns << "allocate image data: " << size << llendl; + llinfos << "about to allocate image data size [" << size << "]" << llendl; + mData = new U8[size]; + } + catch (std::bad_alloc& ba) + { + llwarns << "failed to allocate image data size [" << size + << "] error: [" << ba.what() << "]" << llendl; size = 0 ; mWidth = mHeight = 0 ; mBadBufferAllocation = true ;