From 99e7e725072c8682f2de2eeb13d93181357d6a03 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 6 Jul 2010 11:20:05 +0100 Subject: CID-486 Checker: NULL_RETURNS Function: LLAgentWearables::revertWearable(LLWearableType::EType, unsigned int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e70511ce6e..6acbc16018 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -511,7 +511,11 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index) { LLWearable* wearable = getWearable(type, index); - wearable->revertValues(); + llassert(wearable); + if (wearable) + { + wearable->revertValues(); + } gAgent.sendAgentSetAppearance(); } -- cgit v1.2.3 From e04df15bf1280d29f998a18bbb326f4bfa991f69 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 6 Jul 2010 11:21:45 +0100 Subject: CID-484 Checker: NULL_RETURNS Function: LLAgentWearables::animateAllWearableParams(float, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6acbc16018..266aaaff4a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1944,7 +1944,11 @@ void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake) for (S32 count = 0; count < (S32)getWearableCount((LLWearableType::EType)type); ++count) { LLWearable *wearable = getWearable((LLWearableType::EType)type,count); - wearable->animateParams(delta, upload_bake); + llassert(wearable); + if (wearable) + { + wearable->animateParams(delta, upload_bake); + } } } } -- cgit v1.2.3 From a1bbba2be64daf332bdf511129b1ec4f2bea1540 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 6 Jul 2010 11:23:22 +0100 Subject: CID-485 Checker: NULL_RETURNS Function: LLAgentWearables::setWearableName(const LLUUID &, const std::basic_string, std::allocator>&) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 266aaaff4a..efa5eca217 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -547,6 +547,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& { LLWearable* old_wearable = getWearable((LLWearableType::EType)i,j); llassert(old_wearable); + if (!old_wearable) continue; std::string old_name = old_wearable->getName(); old_wearable->setName(new_name); -- cgit v1.2.3