From 141089327649f9b89be4ac9cc2b50f56eee62a48 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Thu, 5 Jan 2012 21:26:06 -0700
Subject: [PATCH] fix for SH-2829: [crashhunters] Crash in
 LLWearable::importFile()/LLOverrideBakedTextureUpdate::LLOverrideBakedTextureUpdate()

---
 indra/newview/llagentwearablesfetch.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 1edc96e1652..4097ff707c6 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -111,6 +111,12 @@ void LLInitialWearablesFetch::add(InitialWearableData &data)
 
 void LLInitialWearablesFetch::processContents()
 {
+	if(!gAgentAvatarp) //no need to process wearables if the agent avatar is deleted.
+	{
+		delete this;
+		return ;
+	}
+
 	// Fetch the wearable items from the Current Outfit Folder
 	LLInventoryModel::cat_array_t cat_array;
 	LLInventoryModel::item_array_t wearable_array;
-- 
GitLab