* Catch a WebException in the LoadImageURLModule
parent
f4acaafd3a
commit
eb777b7373
|
@ -133,7 +133,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
|||
{
|
||||
RequestState state = (RequestState) result.AsyncState;
|
||||
WebRequest request = (WebRequest) state.Request;
|
||||
HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result);
|
||||
try
|
||||
{
|
||||
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
|
||||
if (response.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
Bitmap image = new Bitmap(response.GetResponseStream());
|
||||
|
@ -171,6 +173,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
|||
m_textureManager.ReturnData(state.RequestID, imageJ2000);
|
||||
}
|
||||
}
|
||||
catch (WebException)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#region Nested type: RequestState
|
||||
|
||||
|
|
Loading…
Reference in New Issue