summaryrefslogtreecommitdiff
path: root/indra/newview/llexperienceassociationresponder.cpp
diff options
context:
space:
mode:
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");