summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-05-18 17:44:24 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-05-18 17:44:24 -0400
commitb9a8e7f4282f521fc382a8ac083eb2375183cfa9 (patch)
treec04def114f5c35906746e4492d7f3047a94c1b37 /indra/newview/llvoavatarself.cpp
parent469ce412e3c98273a4c2503969b1ab5e7ad055b5 (diff)
crash prevention for viewer debug logging.
Will be code reviewed before push, will be removed before release. -Nyx
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 739c021311..61cae3b64f 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1766,7 +1766,16 @@ void LLVOAvatarSelf::onTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture
void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
LLAvatarTexData *data = (LLAvatarTexData *)userdata;
+ if (!data)
+ {
+ return;
+ }
+
ETextureIndex index = data->mIndex;
+ if (index < 0 || index >= TEX_NUM_INDICES)
+ {
+ return;
+ }
if (discard_level >=0 && discard_level <= MAX_DISCARD_LEVEL) // ignore discard level -1, as it means we have no data.
{