diff options
author | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2015-09-04 17:59:31 +0300 |
---|---|---|
committer | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2015-09-04 17:59:31 +0300 |
commit | 863016ea4b61db17347515e37680638a62e5aea2 (patch) | |
tree | 2d5a7e3ed874c1c75eddd535d47f7f5707f705c8 /indra | |
parent | 4d23c98faba3dbbb030ceac3f8278fa6869fdde3 (diff) |
MAINT-5488 ADD FIX [Experience Tools] Opening an experience compiled script in an object in an adjacent region fails to show the script is compiled with an experience in the script editor.
This change is needed for related MAINT-5470
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llexperienceassociationresponder.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llexperienceassociationresponder.cpp b/indra/newview/llexperienceassociationresponder.cpp index 7f2363aadc..f62ca7d75f 100644 --- a/indra/newview/llexperienceassociationresponder.cpp +++ b/indra/newview/llexperienceassociationresponder.cpp @@ -51,10 +51,18 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca LLViewerObject* object = gObjectList.findObject(request["object-id"]); if (!object) { - LL_WARNS() << "Failed to find object with ID " << request["object-id"] << " in fetchAssociatedExperience" << LL_ENDL; - return; + LL_DEBUGS() << "Object with ID " << request["object-id"] << " not found via gObjectList.findObject() in fetchAssociatedExperience" << LL_ENDL; + LL_DEBUGS() << "Using gAgent.getRegion() instead of object->getRegion()" << LL_ENDL; + } + LLViewerRegion* region = NULL; + if (object) + { + region = object->getRegion(); + } + else + { + region = gAgent.getRegion(); } - LLViewerRegion* region = object->getRegion(); if (region) { std::string lookup_url=region->getCapability("GetMetadata"); @@ -66,6 +74,10 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(callback)); } } + else + { + LL_WARNS() << "Failed to lookup region in fetchAssociatedExperience. Fetch request not sent." << LL_ENDL; + } } void ExperienceAssociationResponder::httpFailure() |