diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-08 21:41:43 +0200 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-08 21:41:43 +0200 | 
| commit | 39a50b0face299bbcae2a63f3fd51a41f8bb35cd (patch) | |
| tree | c8aed254a55366f8e0321b11ac78b3acdd2df436 /indra | |
| parent | e06c322971aeba9a065efb6f53139010243aa428 (diff) | |
SL-19134 Fix thumbnail ctrl not drawing an 'X' for empty texture
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llthumbnailctrl.cpp | 21 | 
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())      {  | 
