Crash fix for empty media URL.
Apparently LLViewerMediaImpl::navigateInternal could be called with an empty url. That lead to a curl request with an empty url, which failed because that leads to an empty 'service' string, which is not allowed. Patched the code to ignore empty media urls and hardened AICurl to deal with any remaining cases.
This commit is contained in:
@@ -2595,6 +2595,12 @@ void LLViewerMediaImpl::unload()
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request)
|
||||
{
|
||||
if (url.empty())
|
||||
{
|
||||
llwarns << "Calling LLViewerMediaImpl::navigateTo with empty url" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
cancelMimeTypeProbe();
|
||||
|
||||
if(mMediaURL != url)
|
||||
@@ -2639,6 +2645,12 @@ void LLViewerMediaImpl::navigateInternal()
|
||||
// Helpful to have media urls in log file. Shouldn't be spammy.
|
||||
llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl;
|
||||
|
||||
if (mMediaURL.empty())
|
||||
{
|
||||
llwarns << "Calling LLViewerMediaImpl::navigateInternal() with empty mMediaURL" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(mNavigateSuspended)
|
||||
{
|
||||
llwarns << "Deferring navigate." << llendl;
|
||||
|
||||
Reference in New Issue
Block a user