From 2f48e281556fc1b2317fe02ce30156597bd291a4 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 24 Oct 2016 13:28:54 +0300 Subject: MAINT-6861 FIXED Viewer crashes when attempting to block an experience from the permissions request dialog. --- indra/newview/llviewermessage.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f27b77e2f1..15ecfe5dca 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6391,6 +6391,16 @@ bool unknown_script_question_cb(const LLSD& notification, const LLSD& response) return false; } +void experiencePermissionBlock(LLUUID experience, LLSD result) +{ + LLSD permission; + LLSD data; + permission["permission"] = "Block"; + data[experience.asString()] = permission; + data["experience"] = experience; + LLEventPumps::instance().obtain("experience_permission").post(data); +} + bool script_question_cb(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -6467,14 +6477,8 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) if (!region) return false; - LLExperienceCache::instance().setExperiencePermission(experience, std::string("Block"), LLExperienceCache::ExperienceGetFn_t()); + LLExperienceCache::instance().setExperiencePermission(experience, std::string("Block"), boost::bind(&experiencePermissionBlock, experience, _1)); - LLSD permission; - LLSD data; - permission["permission"] = "Block"; - data[experience.asString()] = permission; - data["experience"] = experience; - LLEventPumps::instance().obtain("experience_permission").post(data); } } return false; -- cgit v1.2.3