diff options
author | Diva Canto | 2015-11-01 11:36:11 -0800 |
---|---|---|
committer | Diva Canto | 2015-11-01 11:37:59 -0800 |
commit | af7c002d52469e12cf37fe09454c59141db35e83 (patch) | |
tree | dde68187d597cc167486d63bd9e21445d767b044 | |
parent | Plumb the special VeriableWearablesSuported field which we will (diff) | |
download | opensim-SC-af7c002d52469e12cf37fe09454c59141db35e83.zip opensim-SC-af7c002d52469e12cf37fe09454c59141db35e83.tar.gz opensim-SC-af7c002d52469e12cf37fe09454c59141db35e83.tar.bz2 opensim-SC-af7c002d52469e12cf37fe09454c59141db35e83.tar.xz |
Don't crash the sim if the map image is null.
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 860a526..08d6bdd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
57 | { | 57 | { |
58 | private static readonly ILog m_log = | 58 | private static readonly ILog m_log = |
59 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 59 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
60 | private static string LogHeader = "[MAP IMAGE SERVICE MODULE]"; | 60 | private static string LogHeader = "[MAP IMAGE SERVICE MODULE]:"; |
61 | 61 | ||
62 | private bool m_enabled = false; | 62 | private bool m_enabled = false; |
63 | private IMapImageService m_MapService; | 63 | private IMapImageService m_MapService; |
@@ -204,6 +204,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
204 | 204 | ||
205 | public void UploadMapTile(IScene scene, Bitmap mapTile) | 205 | public void UploadMapTile(IScene scene, Bitmap mapTile) |
206 | { | 206 | { |
207 | if (mapTile == null) | ||
208 | { | ||
209 | m_log.WarnFormat("{0} Cannot upload null image", LogHeader); | ||
210 | return; | ||
211 | } | ||
212 | |||
207 | m_log.DebugFormat("{0} Upload maptile for {1}", LogHeader, scene.Name); | 213 | m_log.DebugFormat("{0} Upload maptile for {1}", LogHeader, scene.Name); |
208 | 214 | ||
209 | // mapTile.Save( // DEBUG DEBUG | 215 | // mapTile.Save( // DEBUG DEBUG |