diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-18 18:03:01 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-18 18:03:01 -0400 |
commit | 263877fec111f77d3116913c440e454cba216c61 (patch) | |
tree | 3198b493245891f0e633f95d204aa61f18597902 | |
parent | 0b5c84df9406cdb731158ae4e07350156a3b528e (diff) |
FIX: crash on texture load callback timer.
After reviewing with bao, re-initialize memory to be NULL after delete to ensure that stray callbacks don't try to use it.
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 79b235afae..695ea68ae8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1772,7 +1772,8 @@ void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture * } ETextureIndex index = data->mIndex; - if (index < 0 || index >= TEX_NUM_INDICES) + +if (index < 0 || index >= TEX_NUM_INDICES) { return; } @@ -1784,6 +1785,8 @@ void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture * if (final) { delete data; + // for debugging, apparently there is a case in which we are keeping old de-allocated structures around in callbacks + *data = NULL; } } |