From 263877fec111f77d3116913c440e454cba216c61 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 18 May 2010 18:03:01 -0400 Subject: 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. --- indra/newview/llvoavatarself.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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; } } -- cgit v1.2.3