aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 1c7baa2..3f640c5 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -806,10 +806,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
806 finally 806 finally
807 { 807 {
808 // Reclaim memory, these are unmanaged resources 808 // Reclaim memory, these are unmanaged resources
809 mapTexture.Dispose(); 809 // If we encountered an exception, one or more of these will be null
810 image.Dispose(); 810 if (mapTexture != null)
811 imgstream.Close(); 811 mapTexture.Dispose();
812 imgstream.Dispose(); 812
813 if (image != null)
814 image.Dispose();
815
816 if (imgstream != null)
817 {
818 imgstream.Close();
819 imgstream.Dispose();
820 }
813 } 821 }
814 } 822 }
815 else 823 else