aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2016-03-23 21:03:20 +0100
committerMelanie Thielker2016-03-23 21:03:20 +0100
commit4cc954249daf09bd4acf6ce31dc163d83c3dde26 (patch)
treec12c86493b98ea958e175cdabcde8d836bd5e969 /OpenSim
parentCorrect the case of the Presence table (diff)
downloadopensim-SC-4cc954249daf09bd4acf6ce31dc163d83c3dde26.zip
opensim-SC-4cc954249daf09bd4acf6ce31dc163d83c3dde26.tar.gz
opensim-SC-4cc954249daf09bd4acf6ce31dc163d83c3dde26.tar.bz2
opensim-SC-4cc954249daf09bd4acf6ce31dc163d83c3dde26.tar.xz
Mantis 7842 - remove another possible null dereference
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index d45962f..04536e4 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -274,27 +274,27 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
274 stream.Close(); 274 stream.Close();
275 275
276 if (response != null) 276 if (response != null)
277 response.Close();
278
279 if (
280 response.StatusCode == HttpStatusCode.MovedPermanently
281 || response.StatusCode == HttpStatusCode.Found
282 || response.StatusCode == HttpStatusCode.SeeOther
283 || response.StatusCode == HttpStatusCode.TemporaryRedirect)
284 { 277 {
285 string redirectedUrl = response.Headers["Location"]; 278 if (response.StatusCode == HttpStatusCode.MovedPermanently
279 || response.StatusCode == HttpStatusCode.Found
280 || response.StatusCode == HttpStatusCode.SeeOther
281 || response.StatusCode == HttpStatusCode.TemporaryRedirect)
282 {
283 string redirectedUrl = response.Headers["Location"];
286 284
287 MakeHttpRequest(redirectedUrl, state.RequestID); 285 MakeHttpRequest(redirectedUrl, state.RequestID);
288 } 286 }
289 else 287 else
290 { 288 {
291 m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", 289 m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}",
292 imageJ2000.Length, state.RequestID); 290 imageJ2000.Length, state.RequestID);
293 291
294 m_textureManager.ReturnData( 292 m_textureManager.ReturnData(
295 state.RequestID, 293 state.RequestID,
296 new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( 294 new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture(
297 request.RequestUri, null, imageJ2000, newSize, false)); 295 request.RequestUri, null, imageJ2000, newSize, false));
296 }
297 response.Close();
298 } 298 }
299 } 299 }
300 } 300 }