summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-19 04:38:19 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-19 04:38:19 +0200
commit9a1af101cd89c6b908eb2810d94de706b37bd0ea (patch)
treeb3abc99610c08b854fe69f5170b3c85bd544bdfc /indra/llimage
parentbaeb14b7562ac926ab39c8abbb6cd910310548d8 (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
Merge branch 'master' into DRTVWR-543-maint
# Conflicts: # indra/newview/llagentwearables.cpp # indra/newview/llvoicevivox.cpp
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index aed8943439..983c7c2406 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -1456,7 +1456,7 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
setDataAndSize(new_data, new_width, new_height, components);
}
}
- else
+ else try
{
// copy out existing image data
S32 temp_data_size = old_width * old_height * components;
@@ -1490,6 +1490,11 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
}
}
}
+ catch (std::bad_alloc&) // for temp_buffer
+ {
+ LL_WARNS() << "Failed to allocate temporary image buffer" << LL_ENDL;
+ return false;
+ }
return true ;
}