diff options
Diffstat (limited to 'indra/newview')
-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()) { |