summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmipmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llworldmipmap.cpp')
-rw-r--r--indra/newview/llworldmipmap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index d8ea2b884f..78151ebd1c 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -148,6 +148,11 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
{
// Load it
LLPointer<LLViewerFetchedTexture> img = loadObjectsTile(grid_x, grid_y, level);
+ if(img == nullptr)
+ {
+ LL_ERRS() << "loadObjectsTile() failed" << LL_ENDL;
+ return NULL;
+ }
// Insert the image in the map
level_mipmap.insert(sublevel_tiles_t::value_type( handle, img ));
// Find the element again in the map (it's there now...)
@@ -162,6 +167,12 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
// Get the image pointer and check if this asset is missing
LLPointer<LLViewerFetchedTexture> img = found->second;
+ if(img == nullptr)
+ {
+ LL_ERRS() << "img is NULL" << LL_ENDL;
+ return NULL;
+ }
+
if (img->isMissingAsset())
{
// Return NULL if asset missing
@@ -191,6 +202,12 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32
//LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL;
LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+
+ if(img == nullptr)
+ {
+ LL_ERRS() << "fetching map tile FAILED from " << imageurl << LL_ENDL;
+ return nullptr;
+ }
LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL;
img->setBoostLevel(LLGLTexture::BOOST_MAP);