diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | 9 |
2 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs index 42d09eb..4d0568d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | |||
@@ -247,6 +247,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
247 | 247 | ||
248 | if (m_asset == null) | 248 | if (m_asset == null) |
249 | { | 249 | { |
250 | m_log.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID); | ||
250 | client.SendImageNotFound(TextureID); | 251 | client.SendImageNotFound(TextureID); |
251 | return true; | 252 | return true; |
252 | } | 253 | } |
@@ -384,8 +385,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
384 | 385 | ||
385 | if (asset == null || asset.Data == null) | 386 | if (asset == null || asset.Data == null) |
386 | { | 387 | { |
387 | m_asset = null; | 388 | if (m_imageManager.MissingImage != null) |
388 | IsDecoded = true; | 389 | { |
390 | m_asset = m_imageManager.MissingImage.Data; | ||
391 | } | ||
392 | else | ||
393 | { | ||
394 | m_asset = null; | ||
395 | IsDecoded = true; | ||
396 | } | ||
389 | } | 397 | } |
390 | else | 398 | else |
391 | { | 399 | { |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index bdb33dd..41dd4d1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
54 | 54 | ||
55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
56 | private bool m_shuttingdown; | 56 | private bool m_shuttingdown; |
57 | private AssetBase m_missingImage; | ||
57 | private IAssetService m_assetCache; | 58 | private IAssetService m_assetCache; |
58 | private IJ2KDecoder m_j2kDecodeModule; | 59 | private IJ2KDecoder m_j2kDecodeModule; |
59 | 60 | ||
@@ -72,11 +73,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
72 | /// </summary> | 73 | /// </summary> |
73 | public IClientAPI Client { get; private set; } | 74 | public IClientAPI Client { get; private set; } |
74 | 75 | ||
76 | public AssetBase MissingImage { get { return m_missingImage; } } | ||
77 | |||
75 | public LLImageManager(IClientAPI client, IAssetService pAssetCache, IJ2KDecoder pJ2kDecodeModule) | 78 | public LLImageManager(IClientAPI client, IAssetService pAssetCache, IJ2KDecoder pJ2kDecodeModule) |
76 | { | 79 | { |
77 | Client = client; | 80 | Client = client; |
78 | m_assetCache = pAssetCache; | 81 | m_assetCache = pAssetCache; |
79 | 82 | ||
83 | if (pAssetCache != null) | ||
84 | m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f"); | ||
85 | |||
86 | if (m_missingImage == null) | ||
87 | m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client"); | ||
88 | |||
80 | m_j2kDecodeModule = pJ2kDecodeModule; | 89 | m_j2kDecodeModule = pJ2kDecodeModule; |
81 | } | 90 | } |
82 | 91 | ||