From 3757e9d1b7cc99c29b03e14d38138e5a59b7a152 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Mon, 17 Aug 2015 20:33:02 +0300 Subject: 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. --- indra/newview/llexperienceassociationresponder.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra') 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"); -- cgit v1.2.3