avoid potencial null refs
parent
7c60e83f30
commit
9f3c803552
|
@ -637,11 +637,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if(request.InputStream != null && request.InputStream.CanRead)
|
||||||
|
request.InputStream.Close();
|
||||||
byte[] buffer500 = SendHTML500(response);
|
byte[] buffer500 = SendHTML500(response);
|
||||||
response.OutputStream.Write(buffer500, 0, buffer500.Length);
|
response.OutputStream.Write(buffer500, 0, buffer500.Length);
|
||||||
response.Send();
|
response.Send();
|
||||||
if(request.InputStream.CanRead)
|
|
||||||
request.InputStream.Close();
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -829,7 +829,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(request.InputStream.CanRead)
|
if(request.InputStream != null && request.InputStream.CanRead)
|
||||||
request.InputStream.Dispose();
|
request.InputStream.Dispose();
|
||||||
|
|
||||||
if (buffer != null)
|
if (buffer != null)
|
||||||
|
@ -894,7 +894,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if(request.InputStream.CanRead)
|
if(request.InputStream != null && request.InputStream.CanRead)
|
||||||
request.InputStream.Close();
|
request.InputStream.Close();
|
||||||
|
|
||||||
// Every month or so this will wrap and give bad numbers, not really a problem
|
// Every month or so this will wrap and give bad numbers, not really a problem
|
||||||
|
|
Loading…
Reference in New Issue