Don't crash the sim if the map image is null.

avinationmerge
Diva Canto 2015-11-01 11:36:11 -08:00
parent 29798cefcc
commit aea86f30a0
1 changed files with 7 additions and 1 deletions

View File

@ -58,7 +58,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