summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-29 13:10:37 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-29 13:10:37 -0700
commit58a73b4fc1e39df13c3c11a6f286cdeeace26c4f (patch)
tree90e97c7ba30f4b037a72032088b9ed78290110fb
parent7f639cb715af7f63bd8780c04a84eff8fa07a87a (diff)
MAINT-1791 : Parcel media clear list crash. Reviewed by Kelly
-rw-r--r--indra/llmessage/llurlrequest.cpp7
-rw-r--r--indra/newview/llfloaterurlentry.cpp3
2 files changed, 7 insertions, 3 deletions
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 5831c3c1c1..227efdb07a 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -356,7 +356,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
}
}
- while(1)
+ bool keep_looping = true;
+ while(keep_looping)
{
CURLcode result;
@@ -408,8 +409,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
case CURLE_FAILED_INIT:
case CURLE_COULDNT_CONNECT:
status = STATUS_NO_CONNECTION;
+ keep_looping = false;
break;
- default:
+ default: // CURLE_URL_MALFORMAT
llwarns << "URLRequest Error: " << result
<< ", "
<< LLCurl::strerror(result)
@@ -417,6 +419,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
<< (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL)
<< llendl;
status = STATUS_ERROR;
+ keep_looping = false;
break;
}
}
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 151cd2a1cd..e85d849c9a 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -219,7 +219,8 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
}
// Discover the MIME type only for "http" scheme.
- if(scheme == "http" || scheme == "https")
+ if(!media_url.empty() &&
+ (scheme == "http" || scheme == "https"))
{
LLHTTPClient::getHeaderOnly( media_url,
new LLMediaTypeResponder(self->getHandle()));