summaryrefslogtreecommitdiff
path: root/indra/newview/llexperienceassociationresponder.cpp
diff options
context:
space:
mode:
authorpavelkproductengine <pavelkproductengine@lindenlab.com>2015-08-17 20:33:02 +0300
committerpavelkproductengine <pavelkproductengine@lindenlab.com>2015-08-17 20:33:02 +0300
commit3757e9d1b7cc99c29b03e14d38138e5a59b7a152 (patch)
tree64e41224f03a3190546e6d3588ffd433a9328df5 /indra/newview/llexperienceassociationresponder.cpp
parent62d9b8cbf263f93143352a33d2735a36ce5112b6 (diff)
MAINT-5488 FIXED [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.
Diffstat (limited to 'indra/newview/llexperienceassociationresponder.cpp')
-rw-r--r--indra/newview/llexperienceassociationresponder.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llexperienceassociationresponder.cpp b/indra/newview/llexperienceassociationresponder.cpp
index b50c81eedc..7f2363aadc 100644
--- a/indra/newview/llexperienceassociationresponder.cpp
+++ b/indra/newview/llexperienceassociationresponder.cpp
@@ -29,6 +29,7 @@
#include "llviewerprecompiledheaders.h"
#include "llexperienceassociationresponder.h"
#include "llexperiencecache.h"
+#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llagent.h"
@@ -47,7 +48,13 @@ void ExperienceAssociationResponder::fetchAssociatedExperience( const LLUUID& ob
void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, callback_t callback)
{
- LLViewerRegion* region = gAgent.getRegion();
+ 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;
+ }
+ LLViewerRegion* region = object->getRegion();
if (region)
{
std::string lookup_url=region->getCapability("GetMetadata");