summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-08 21:41:43 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-08 21:41:43 +0200
commit39a50b0face299bbcae2a63f3fd51a41f8bb35cd (patch)
treec8aed254a55366f8e0321b11ac78b3acdd2df436
parente06c322971aeba9a065efb6f53139010243aa428 (diff)
SL-19134 Fix thumbnail ctrl not drawing an 'X' for empty texture
-rw-r--r--indra/newview/llthumbnailctrl.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp
index 8f51f2c80d..4245237529 100644
--- a/indra/newview/llthumbnailctrl.cpp
+++ b/indra/newview/llthumbnailctrl.cpp
@@ -164,16 +164,19 @@ void LLThumbnailCtrl::setValue(const LLSD& value)
if (tvalue.isUUID())
{
mImageAssetID = tvalue.asUUID();
- // Should it support baked textures?
- mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ if (mImageAssetID.notNull())
+ {
+ // Should it support baked textures?
+ mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- mTexturep->setBoostLevel(mPriority);
- mTexturep->forceToSaveRawImage(0);
-
- S32 desired_draw_width = mTexturep->getWidth();
- S32 desired_draw_height = mTexturep->getHeight();
-
- mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
+ mTexturep->setBoostLevel(mPriority);
+ mTexturep->forceToSaveRawImage(0);
+
+ S32 desired_draw_width = mTexturep->getWidth();
+ S32 desired_draw_height = mTexturep->getHeight();
+
+ mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
+ }
}
else if (tvalue.isString())
{