summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarrenderinfoaccountant.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-31 01:58:09 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-31 01:58:09 +0300
commit9b0569840f06137ee2379463f5028a5342c3555a (patch)
tree279eaa517131fe4e073d8d9781e0b69e747a0bb9 /indra/newview/llavatarrenderinfoaccountant.cpp
parent1e09d25d9ce8b7ec8da28ad5364d81c0faab9d0a (diff)
parentcdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (diff)
Merge branch 'master' into DRTVWR-544-maint
# Conflicts: # indra/llprimitive/llmodel.cpp # indra/llprimitive/llmodel.h # indra/newview/llappviewer.cpp # indra/newview/llappviewer.h
Diffstat (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp')
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 1758722bbb..275f17b02a 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -82,7 +82,15 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
+ LLWorld *world_inst = LLWorld::getInstance();
+ if (!world_inst)
+ {
+ LL_WARNS("AvatarRenderInfoAccountant") << "Avatar render weight info received but world no longer exists "
+ << regionHandle << LL_ENDL;
+ return;
+ }
+
+ LLViewerRegion * regionp = world_inst->getRegionFromHandle(regionHandle);
if (!regionp)
{
LL_WARNS("AvatarRenderInfoAccountant") << "Avatar render weight info received but region not found for "
@@ -183,7 +191,15 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
+ LLWorld *world_inst = LLWorld::getInstance();
+ if (!world_inst)
+ {
+ LL_WARNS("AvatarRenderInfoAccountant") << "Avatar render weight calculation but world no longer exists "
+ << regionHandle << LL_ENDL;
+ return;
+ }
+
+ LLViewerRegion * regionp = world_inst->getRegionFromHandle(regionHandle);
if (!regionp)
{
LL_WARNS("AvatarRenderInfoAccountant") << "Avatar render weight calculation but region not found for "
@@ -239,9 +255,18 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
report[KEY_AGENTS] = agents;
regionp = NULL;
+ world_inst = NULL;
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, report);
- regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
+ world_inst = LLWorld::getInstance();
+ if (!world_inst)
+ {
+ LL_WARNS("AvatarRenderInfoAccountant") << "Avatar render weight POST result but world no longer exists "
+ << regionHandle << LL_ENDL;
+ return;
+ }
+
+ regionp = world_inst->getRegionFromHandle(regionHandle);
if (!regionp)
{
LL_INFOS("AvatarRenderInfoAccountant") << "Avatar render weight POST result received but region not found for "