diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-13 14:16:24 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-13 14:16:24 -0800 |
commit | b9852dde4b18adcda42fa3c4f882d9f6b8168893 (patch) | |
tree | 0803ab3698358d48abb761188ad19f0a77cc4562 /indra/newview/llvovolume.cpp | |
parent | 8d85d29765855162f43af5e212ecff5216cbc6aa (diff) | |
parent | c316edda259a3914ceb0c646a543f144c370a39b (diff) |
Merge.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index cde9b36de9..e77f2eab5f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1927,12 +1927,22 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) if (mep && impl) { std::string url = mep->getCurrentURL(); - if (url.empty()) + // If the url we're trying to "bounce back" to is either empty or not + // allowed by the whitelist, try the home url. If *that* doesn't work, + // set the media as failed and unload it + if (url.empty() || !mep->checkCandidateUrl(url)) { url = mep->getHomeURL(); } - if (! url.empty()) - { + if (url.empty() || !mep->checkCandidateUrl(url)) + { + // The url to navigate back to is not good, and we have nowhere else + // to go. + LL_WARNS("MediaOnAPrim") << "FAILED to bounce back URL \"" << url << "\" -- unloading impl" << LL_ENDL; + impl->setMediaFailed(true); + } + else { + // Okay, navigate now LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL; impl->navigateTo(url, "", false, true); } |