diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-03 22:57:28 +0200 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-03-05 00:29:35 +0200 | 
| commit | 78ce375dda587cbc86ade15a4d564a469e6db9d3 (patch) | |
| tree | 9b1ae5e2beb4adc6afa29f28a1678cb42eab0a55 /indra/llimage | |
| parent | 1013ea51a88aba820d41db7fc259296291504c11 (diff) | |
SL-17896 Don't crash silently if files are missing or out of memory
Under debug LL_ERRS will show a message as well, but release won't show
anything and will quit silently so show a notification when applicable.
Diffstat (limited to 'indra/llimage')
| -rw-r--r-- | indra/llimage/llimagebmp.cpp | 1 | ||||
| -rw-r--r-- | indra/llimage/llimagedxt.cpp | 1 | ||||
| -rw-r--r-- | indra/llimage/llimagetga.cpp | 1 | 
3 files changed, 3 insertions, 0 deletions
| diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp index 90b7272efa..cdea0da68d 100644 --- a/indra/llimage/llimagebmp.cpp +++ b/indra/llimage/llimagebmp.cpp @@ -321,6 +321,7 @@ bool LLImageBMP::updateData()  		mColorPalette = new(std::nothrow) U8[color_palette_size];  		if (!mColorPalette)  		{ +            LLError::LLUserWarningMsg::showOutOfMemory();  			LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL;  			return false;  		} diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 36317a5ba8..ae76c5243f 100644 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp @@ -437,6 +437,7 @@ bool LLImageDXT::convertToDXR()  	U8* newdata = (U8*)ll_aligned_malloc_16(total_bytes);  	if (!newdata)  	{ +        LLError::LLUserWarningMsg::showOutOfMemory();  		LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;  		return false;  	} diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp index 88bdae9b80..152a7f309c 100644 --- a/indra/llimage/llimagetga.cpp +++ b/indra/llimage/llimagetga.cpp @@ -266,6 +266,7 @@ bool LLImageTGA::updateData()  			mColorMap = new(std::nothrow) U8[ color_map_bytes ];    			if (!mColorMap)  			{ +                LLError::LLUserWarningMsg::showOutOfMemory();  				LL_ERRS() << "Out of Memory in bool LLImageTGA::updateData()" << LL_ENDL;  				return false;  			} | 
