aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 039c3fa..d78ade5 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -139,8 +139,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
139 string tempName = Path.GetTempFileName(); 139 string tempName = Path.GetTempFileName();
140 140
141 Bitmap existingBitmap = null; 141 Bitmap existingBitmap = null;
142 Bitmap thisBitmap; 142 Bitmap thisBitmap = null;
143 Bitmap newBitmap; 143 Bitmap newBitmap = null;
144 144
145 try 145 try
146 { 146 {
@@ -176,8 +176,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
176 if (existingBitmap != null) 176 if (existingBitmap != null)
177 existingBitmap.Dispose(); 177 existingBitmap.Dispose();
178 178
179 thisBitmap.Dispose(); 179 if (thisBitmap != null)
180 newBitmap.Dispose(); 180 thisBitmap.Dispose();
181
182 if (newBitmap != null)
183 newBitmap.Dispose();
181 184
182 if (File.Exists(tempName)) 185 if (File.Exists(tempName))
183 File.Delete(tempName); 186 File.Delete(tempName);