mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
Stop exceptions being thrown if GenerateMapTiles = false but no static map tile has been set. Do more informative warn instead.
This commit is contained in:
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
public void Close() { }
|
||||
public void PostInitialise() { }
|
||||
|
||||
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
///</summary>
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (! m_enabled)
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
// Every shared region module has to maintain an indepedent list of
|
||||
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
|
||||
using (Image mapTile = tileGenerator.CreateMapTile())
|
||||
{
|
||||
// XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there
|
||||
// is no static map tile.
|
||||
if (mapTile == null)
|
||||
return;
|
||||
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
{
|
||||
mapTile.Save(stream, ImageFormat.Jpeg);
|
||||
|
||||
Reference in New Issue
Block a user