diff options
author | UbitUmarov | 2018-08-26 08:40:35 +0100 |
---|---|---|
committer | UbitUmarov | 2018-08-26 08:40:35 +0100 |
commit | 9f3c8035526a85e3a17400139dcd4fe986b98b57 (patch) | |
tree | 844508996c7f7343b9f043422fa6141c0b761c74 /OpenSim/Framework | |
parent | don't shutdown robust twice (diff) | |
download | opensim-SC-9f3c8035526a85e3a17400139dcd4fe986b98b57.zip opensim-SC-9f3c8035526a85e3a17400139dcd4fe986b98b57.tar.gz opensim-SC-9f3c8035526a85e3a17400139dcd4fe986b98b57.tar.bz2 opensim-SC-9f3c8035526a85e3a17400139dcd4fe986b98b57.tar.xz |
avoid potencial null refs
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 79f4952..2819bc9 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -637,11 +637,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
637 | { | 637 | { |
638 | try | 638 | try |
639 | { | 639 | { |
640 | if(request.InputStream != null && request.InputStream.CanRead) | ||
641 | request.InputStream.Close(); | ||
640 | byte[] buffer500 = SendHTML500(response); | 642 | byte[] buffer500 = SendHTML500(response); |
641 | response.OutputStream.Write(buffer500, 0, buffer500.Length); | 643 | response.OutputStream.Write(buffer500, 0, buffer500.Length); |
642 | response.Send(); | 644 | response.Send(); |
643 | if(request.InputStream.CanRead) | ||
644 | request.InputStream.Close(); | ||
645 | } | 645 | } |
646 | catch | 646 | catch |
647 | { | 647 | { |
@@ -829,7 +829,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
829 | } | 829 | } |
830 | } | 830 | } |
831 | 831 | ||
832 | if(request.InputStream.CanRead) | 832 | if(request.InputStream != null && request.InputStream.CanRead) |
833 | request.InputStream.Dispose(); | 833 | request.InputStream.Dispose(); |
834 | 834 | ||
835 | if (buffer != null) | 835 | if (buffer != null) |
@@ -894,7 +894,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
894 | } | 894 | } |
895 | finally | 895 | finally |
896 | { | 896 | { |
897 | if(request.InputStream.CanRead) | 897 | if(request.InputStream != null && request.InputStream.CanRead) |
898 | request.InputStream.Close(); | 898 | request.InputStream.Close(); |
899 | 899 | ||
900 | // Every month or so this will wrap and give bad numbers, not really a problem | 900 | // Every month or so this will wrap and give bad numbers, not really a problem |