Safe and probably pointless crash workarounds from FS and LL
This commit is contained in:
@@ -53,7 +53,7 @@ std::string ll_safe_string(const char* in)
|
||||
|
||||
std::string ll_safe_string(const char* in, S32 maxlen)
|
||||
{
|
||||
if(in) return std::string(in, maxlen);
|
||||
if(in && maxlen > 0) return std::string(in, maxlen);
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ void LLAttachmentsMgr::onIdle(void *)
|
||||
|
||||
void LLAttachmentsMgr::onIdle()
|
||||
{
|
||||
if(!gAgent.getRegion())
|
||||
return;
|
||||
|
||||
S32 obj_count = mPendingAttachments.size();
|
||||
if (obj_count == 0)
|
||||
{
|
||||
|
||||
@@ -931,7 +931,7 @@ void LLTextureFetchWorker::startWork(S32 param)
|
||||
// Called from LLWorkerThread::processRequest()
|
||||
bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
static const F32 FETCHING_TIMEOUT = 120.f;//seconds
|
||||
static const F32 FETCHING_TIMEOUT = 15.f;//seconds
|
||||
|
||||
LLMutexLock lock(&mWorkMutex);
|
||||
|
||||
|
||||
@@ -1891,7 +1891,7 @@ void LLViewerFetchedTexture::updateVirtualSize()
|
||||
for(U32 i = 0 ; i < mNumFaces ; i++)
|
||||
{
|
||||
LLFace* facep = mFaceList[i] ;
|
||||
if(facep->getDrawable()->isRecentlyVisible())
|
||||
if(facep && facep->getDrawable() && facep->getDrawable()->isRecentlyVisible())
|
||||
{
|
||||
addTextureStats(facep->getVirtualSize()) ;
|
||||
setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
|
||||
|
||||
@@ -9700,8 +9700,17 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR &&
|
||||
getImage(te, index)->getID() != IMG_DEFAULT);
|
||||
LLViewerTexture* img = getImage(te, index);
|
||||
if(img)
|
||||
{
|
||||
return (img->getID() != IMG_DEFAULT_AVATAR &&
|
||||
img->getID() != IMG_DEFAULT);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Image doesn't exist" << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
||||
@@ -1153,6 +1153,9 @@ void LLVOVolume::updateFaceFlags()
|
||||
{
|
||||
for (S32 i = 0; i < getVolume()->getNumFaces(); i++)
|
||||
{
|
||||
if(mDrawable->getNumFaces() <= i || getNumTEs() <= i)
|
||||
return;
|
||||
|
||||
LLFace *face = mDrawable->getFace(i);
|
||||
if (face)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user