From: Alan Webb <alan_webb@us.ibm.com>

logs error message on empty data in DynamicTextureModule
0.6.5-rc1
Dr Scofield 2009-05-07 11:58:45 +00:00
parent f3db3d6a00
commit 3312938f6b
1 changed files with 15 additions and 4 deletions

View File

@ -246,7 +246,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
/// </summary> /// </summary>
public void DataReceived(byte[] data, Scene scene) public void DataReceived(byte[] data, Scene scene)
{ {
SceneObjectPart part = scene.GetSceneObjectPart(PrimID); SceneObjectPart part = scene.GetSceneObjectPart(PrimID);
if (data == null)
{
string msg =
String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url);
scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,
0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false);
return;
}
byte[] assetData; byte[] assetData;
AssetBase oldAsset = null; AssetBase oldAsset = null;
@ -299,7 +310,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
tmptex.DefaultTexture.TextureID = asset.FullID; tmptex.DefaultTexture.TextureID = asset.FullID;
// I'm pretty sure we always want to force this to true // I'm pretty sure we always want to force this to true
// I'm pretty sure noone whats to set fullbright true if it wasn't true before. // I'm pretty sure noone whats to set fullbright true if it wasn't true before.
// tmptex.DefaultTexture.Fullbright = true; // tmptex.DefaultTexture.Fullbright = true;
part.Shape.Textures = tmptex; part.Shape.Textures = tmptex;
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();