diff options
| author | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2018-06-22 12:55:19 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2018-06-22 12:55:19 +0300 |
| commit | 5f432147e373c3223ac06797ecff147d447ed79f (patch) | |
| tree | 942f163ad33ad3997aee3000cae321f5f693ad57 /indra/llmessage/llavatarnamecache.cpp | |
| parent | 99d9befb629c97f7c778c8a9ddfb9d0060d54de9 (diff) | |
| parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) | |
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
| -rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index abe0e46e5d..ba1a2a035e 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -192,13 +192,21 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName() << " with url '" << url << "', requesting " << agentIds.size() << " Agent Ids" << LL_ENDL; + // Check pointer that can be cleaned up by cleanupClass() + if (!sHttpRequest || !sHttpOptions || !sHttpHeaders) + { + LL_WARNS("AvNameCache") << " Trying to request name cache when http pointers are not initialized." << LL_ENDL; + return; + } + + LLSD httpResults; + try { bool success = true; LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", LLAvatarNameCache::sHttpPolicy); LLSD results = httpAdapter.getAndSuspend(sHttpRequest, url); - LLSD httpResults; LL_DEBUGS() << results << LL_ENDL; @@ -237,6 +245,7 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU { LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << LLCoros::instance().getName() << "('" << url << "', " << agentIds.size() + << " http result: " << httpResults.asString() << " Agent Ids)")); throw; } @@ -326,6 +335,11 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName& av_name) { + if (agent_id.isNull()) + { + return; + } + // Add to the cache sCache[agent_id] = av_name; |
