diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-01-11 16:05:42 -0800 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-01-11 16:05:42 -0800 |
| commit | 1a35fe8725d4a55ef1e1b07d59db8e8d0db5e6bf (patch) | |
| tree | 04895ab55cf6ab33f1412131c76a71f4f4d549d4 /indra/newview/llvovolume.cpp | |
| parent | 8440d99e4498882dfc61459a91eba746ad717000 (diff) | |
| parent | 2aaa7971945823f53f0a01028036c37361bcfa17 (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 55609621b3..d23bcf9006 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1852,12 +1852,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); } |
