diff options
-rw-r--r-- | indra/newview/llslurl.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llslurl.h | 5 | ||||
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index a3a8247268..a9b7b0e417 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -112,6 +112,13 @@ LLSLURL::LLSLURL(const std::string& slurl) // and the slurl type (APP or LOCATION) if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) { + if (path_array.size() == 0) + { + // um, we need a path... + mType = EMPTY; + return; + } + // parse a maingrid style slurl. We know the grid is maingrid // so grab it. // A location slurl for maingrid (with the special schemes) can be in the form diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index b86cf7949b..6132a4a8b0 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -52,13 +52,14 @@ public: static const char* SLURL_REGION_PATH; // if you modify this enumeration, update typeName as well - enum SLURL_TYPE { - INVALID, + enum SLURL_TYPE { + INVALID, LOCATION, HOME_LOCATION, LAST_LOCATION, APP, HELP, + EMPTY, NUM_SLURL_TYPES // must be last }; diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 76fb138768..07ea8a4ec6 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -134,6 +134,11 @@ bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser) { + // SL-20422 : Clicking the "Bring it back" link on Aditi displays a teleport alert + // Stop further processing empty urls like [secondlife:/// Bring it back.] + if (slurl.getType() == LLSLURL::EMPTY) + return true; + const bool right_click = false; return dispatchCore(slurl, nav_type, right_click, web, trusted_browser); } |