diff options
author | Justin Clark-Casey (justincc) | 2013-02-02 00:59:26 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-02 00:59:26 +0000 |
commit | 9588328242f4004446b5cc08251995b8d004b4f2 (patch) | |
tree | 3ee046d444d9c883183c3e54bfeb2f53fdd06617 /OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage | |
parent | Sit and Spin reduction. If sitting, slam avatar angular velocity to zero. (diff) | |
download | opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.zip opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.gz opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.bz2 opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.xz |
Stop exceptions being thrown if GenerateMapTiles = false but no static map tile has been set. Do more informative warn instead.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index a839086..26d22b8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
75 | public void Close() { } | 75 | public void Close() { } |
76 | public void PostInitialise() { } | 76 | public void PostInitialise() { } |
77 | 77 | ||
78 | |||
79 | ///<summary> | 78 | ///<summary> |
80 | /// | 79 | /// |
81 | ///</summary> | 80 | ///</summary> |
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
133 | ///</summary> | 132 | ///</summary> |
134 | public void AddRegion(Scene scene) | 133 | public void AddRegion(Scene scene) |
135 | { | 134 | { |
136 | if (! m_enabled) | 135 | if (!m_enabled) |
137 | return; | 136 | return; |
138 | 137 | ||
139 | // Every shared region module has to maintain an indepedent list of | 138 | // Every shared region module has to maintain an indepedent list of |
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
206 | 205 | ||
207 | using (Image mapTile = tileGenerator.CreateMapTile()) | 206 | using (Image mapTile = tileGenerator.CreateMapTile()) |
208 | { | 207 | { |
208 | // XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there | ||
209 | // is no static map tile. | ||
210 | if (mapTile == null) | ||
211 | return; | ||
212 | |||
209 | using (MemoryStream stream = new MemoryStream()) | 213 | using (MemoryStream stream = new MemoryStream()) |
210 | { | 214 | { |
211 | mapTile.Save(stream, ImageFormat.Jpeg); | 215 | mapTile.Save(stream, ImageFormat.Jpeg); |