From af7c002d52469e12cf37fe09454c59141db35e83 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 1 Nov 2015 11:36:11 -0800 Subject: Don't crash the sim if the map image is null. --- .../ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') 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 { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private static string LogHeader = "[MAP IMAGE SERVICE MODULE]"; + private static string LogHeader = "[MAP IMAGE SERVICE MODULE]:"; private bool m_enabled = false; private IMapImageService m_MapService; @@ -204,6 +204,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage public void UploadMapTile(IScene scene, Bitmap mapTile) { + if (mapTile == null) + { + m_log.WarnFormat("{0} Cannot upload null image", LogHeader); + return; + } + m_log.DebugFormat("{0} Upload maptile for {1}", LogHeader, scene.Name); // mapTile.Save( // DEBUG DEBUG -- cgit v1.1