diff options
author | Dr Scofield | 2009-05-07 11:58:45 +0000 |
---|---|---|
committer | Dr Scofield | 2009-05-07 11:58:45 +0000 |
commit | 3312938f6b94a549dead9ceeefaa059c631ec725 (patch) | |
tree | 9b1cc73a9009ca99c8cf54e270b5eef55cb830bf | |
parent | * Added some more GetAssetStreamHandlerTests (diff) | |
download | opensim-SC_OLD-3312938f6b94a549dead9ceeefaa059c631ec725.zip opensim-SC_OLD-3312938f6b94a549dead9ceeefaa059c631ec725.tar.gz opensim-SC_OLD-3312938f6b94a549dead9ceeefaa059c631ec725.tar.bz2 opensim-SC_OLD-3312938f6b94a549dead9ceeefaa059c631ec725.tar.xz |
From: Alan Webb <alan_webb@us.ibm.com>
logs error message on empty data in DynamicTextureModule
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index d7b4d17..a2d6b45 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -246,10 +246,21 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
246 | /// </summary> | 246 | /// </summary> |
247 | public void DataReceived(byte[] data, Scene scene) | 247 | public void DataReceived(byte[] data, Scene scene) |
248 | { | 248 | { |
249 | |||
249 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); | 250 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); |
251 | |||
252 | if (data == null) | ||
253 | { | ||
254 | string msg = | ||
255 | String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url); | ||
256 | scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say, | ||
257 | 0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false); | ||
258 | return; | ||
259 | } | ||
260 | |||
250 | byte[] assetData; | 261 | byte[] assetData; |
251 | AssetBase oldAsset = null; | 262 | AssetBase oldAsset = null; |
252 | 263 | ||
253 | if (BlendWithOldTexture) | 264 | if (BlendWithOldTexture) |
254 | { | 265 | { |
255 | UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; | 266 | UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; |
@@ -295,11 +306,11 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
295 | 306 | ||
296 | // remove the old asset from the cache | 307 | // remove the old asset from the cache |
297 | UUID oldID = tmptex.DefaultTexture.TextureID; | 308 | UUID oldID = tmptex.DefaultTexture.TextureID; |
298 | 309 | ||
299 | tmptex.DefaultTexture.TextureID = asset.FullID; | 310 | tmptex.DefaultTexture.TextureID = asset.FullID; |
300 | // I'm pretty sure we always want to force this to true | 311 | // I'm pretty sure we always want to force this to true |
301 | // I'm pretty sure noone whats to set fullbright true if it wasn't true before. | 312 | // I'm pretty sure noone whats to set fullbright true if it wasn't true before. |
302 | // tmptex.DefaultTexture.Fullbright = true; | 313 | // tmptex.DefaultTexture.Fullbright = true; |
303 | 314 | ||
304 | part.Shape.Textures = tmptex; | 315 | part.Shape.Textures = tmptex; |
305 | part.ScheduleFullUpdate(); | 316 | part.ScheduleFullUpdate(); |