From e24d4c9f4d2f37ee80685c6ab276633b94b366b8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 Jul 2018 20:06:26 +0300 Subject: MAINT-8923 Better allocation failure handling, createGLTexture crashes --- indra/llappearance/llavatarappearance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index e5089f028f..60359ca304 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -1566,9 +1566,10 @@ BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num ) delete_and_clear_array(mCollisionVolumes); mNumCollisionVolumes = 0; - mCollisionVolumes = new LLAvatarJointCollisionVolume[num]; + mCollisionVolumes = new(std::nothrow) LLAvatarJointCollisionVolume[num]; if (!mCollisionVolumes) { + LL_WARNS() << "Failed to allocate collision volumes" << LL_ENDL; return FALSE; } -- cgit v1.2.3