new throws an exception... checking if the return value is not null without either try/catching or using std::nothrow... would accomplish nothing.

This commit is contained in:
Shyotl
2011-10-03 22:42:56 -05:00
parent cd86b3a69b
commit 84a301c81a
2 changed files with 10 additions and 10 deletions

View File

@@ -435,7 +435,7 @@ bool LLImageDXT::convertToDXR()
S32 nmips = calcNumMips(width,height);
S32 total_bytes = getDataSize();
U8* olddata = getData();
U8* newdata = new U8[total_bytes];
U8* newdata = new (std::nothrow) U8[total_bytes];
if (!newdata)
{
llerrs << "Out of memory in LLImageDXT::convertToDXR()" << llendl;