* Fixed NullReferenceExceptions recently introduced into CAPS code [LIBOMV-353]
* Small formatting cleanups in NotationLLSD.cs git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2092 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -138,6 +138,7 @@ namespace OpenMetaverse.Capabilities
|
||||
if (e.Error == null)
|
||||
{
|
||||
LLSD result = LLSDParser.DeserializeXml(e.Result);
|
||||
Logger.DebugLog("Received CAPS response: " + System.Text.Encoding.UTF8.GetString(e.Result));
|
||||
|
||||
try { OnComplete(this, result, e.Error); }
|
||||
catch (Exception ex) { Logger.Log(ex.Message, Helpers.LogLevel.Error, ex); }
|
||||
@@ -146,7 +147,7 @@ namespace OpenMetaverse.Capabilities
|
||||
{
|
||||
// Some error occurred, try to figure out what happened
|
||||
HttpStatusCode code = HttpStatusCode.OK;
|
||||
if (e.Error is WebException)
|
||||
if (e.Error is WebException && ((WebException)e.Error).Response != null)
|
||||
code = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode;
|
||||
|
||||
if (code == HttpStatusCode.BadGateway)
|
||||
@@ -197,7 +198,7 @@ namespace OpenMetaverse.Capabilities
|
||||
{
|
||||
// Some error occurred, try to figure out what happened
|
||||
HttpStatusCode code = HttpStatusCode.OK;
|
||||
if (e.Error is WebException)
|
||||
if (e.Error is WebException && ((WebException)e.Error).Response != null)
|
||||
code = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode;
|
||||
|
||||
if (code == HttpStatusCode.BadGateway)
|
||||
|
||||
Reference in New Issue
Block a user