From 88785f06a832b4070181c4891a9bcb53055b54f6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:02:41 +0000 Subject: CID-426 Checker: UNINIT_CTOR Function: LLPanelScriptLimitsAttachment::LLPanelScriptLimitsAttachment() File: /indra/newview/llfloaterscriptlimits.h and some BOOL->boolification while I was there. --- indra/newview/llfloaterscriptlimits.cpp | 24 ++++++++++++------------ indra/newview/llfloaterscriptlimits.h | 28 +++++++++++++++++++++------- 2 files changed, 33 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 4194416a01..fdf128945e 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -744,13 +744,13 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) { mParcelMemoryUsed = content["summary"]["used"][0]["amount"].asInteger() / SIZE_OF_ONE_KB; mParcelMemoryMax = content["summary"]["available"][0]["amount"].asInteger() / SIZE_OF_ONE_KB; - mGotParcelMemoryUsed = TRUE; + mGotParcelMemoryUsed = true; } else if(content["summary"]["used"][1]["type"].asString() == std::string("memory")) { mParcelMemoryUsed = content["summary"]["used"][1]["amount"].asInteger() / SIZE_OF_ONE_KB; mParcelMemoryMax = content["summary"]["available"][1]["amount"].asInteger() / SIZE_OF_ONE_KB; - mGotParcelMemoryUsed = TRUE; + mGotParcelMemoryUsed = true; } else { @@ -762,13 +762,13 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) { mParcelURLsUsed = content["summary"]["used"][0]["amount"].asInteger(); mParcelURLsMax = content["summary"]["available"][0]["amount"].asInteger(); - mGotParcelURLsUsed = TRUE; + mGotParcelURLsUsed = true; } else if(content["summary"]["used"][1]["type"].asString() == std::string("urls")) { mParcelURLsUsed = content["summary"]["used"][1]["amount"].asInteger(); mParcelURLsMax = content["summary"]["available"][1]["amount"].asInteger(); - mGotParcelURLsUsed = TRUE; + mGotParcelURLsUsed = true; } else { @@ -902,10 +902,10 @@ void LLPanelScriptLimitsRegionMemory::clearList() list->operateOnAll(LLCtrlListInterface::OP_DELETE); } - mGotParcelMemoryUsed = FALSE; - mGotParcelMemoryMax = FALSE; - mGotParcelURLsUsed = FALSE; - mGotParcelURLsMax = FALSE; + mGotParcelMemoryUsed = false; + mGotParcelMemoryMax = false; + mGotParcelURLsUsed = false; + mGotParcelURLsMax = false; LLStringUtil::format_map_t args_parcel_memory; std::string msg_empty_string(""); @@ -1208,13 +1208,13 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content) { mAttachmentMemoryUsed = content["summary"]["used"][0]["amount"].asInteger() / SIZE_OF_ONE_KB; mAttachmentMemoryMax = content["summary"]["available"][0]["amount"].asInteger() / SIZE_OF_ONE_KB; - mGotAttachmentMemoryUsed = TRUE; + mGotAttachmentMemoryUsed = true; } else if(content["summary"]["used"][1]["type"].asString() == std::string("memory")) { mAttachmentMemoryUsed = content["summary"]["used"][1]["amount"].asInteger() / SIZE_OF_ONE_KB; mAttachmentMemoryMax = content["summary"]["available"][1]["amount"].asInteger() / SIZE_OF_ONE_KB; - mGotAttachmentMemoryUsed = TRUE; + mGotAttachmentMemoryUsed = true; } else { @@ -1226,13 +1226,13 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content) { mAttachmentURLsUsed = content["summary"]["used"][0]["amount"].asInteger(); mAttachmentURLsMax = content["summary"]["available"][0]["amount"].asInteger(); - mGotAttachmentURLsUsed = TRUE; + mGotAttachmentURLsUsed = true; } else if(content["summary"]["used"][1]["type"].asString() == std::string("urls")) { mAttachmentURLsUsed = content["summary"]["used"][1]["amount"].asInteger(); mAttachmentURLsMax = content["summary"]["available"][1]["amount"].asInteger(); - mGotAttachmentURLsUsed = TRUE; + mGotAttachmentURLsUsed = true; } else { diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 4c1ecc1019..28a7194faf 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -217,7 +217,21 @@ class LLPanelScriptLimitsAttachment : public LLPanelScriptLimitsInfo public: LLPanelScriptLimitsAttachment() - : LLPanelScriptLimitsInfo() {}; + : LLPanelScriptLimitsInfo(), + mGotAttachmentMemoryUsed(false), + mGotAttachmentMemoryUsedDetails(false), + mGotAttachmentMemoryMax(false), + mAttachmentMemoryMax(0), + mAttachmentMemoryUsed(0), + mAttachmentMemoryUsedDetails(0), + mGotAttachmentURLsUsed(false), + mGotAttachmentURLsUsedDetails(false), + mGotAttachmentURLsMax(false), + mAttachmentURLsMax(0), + mAttachmentURLsUsed(0), + mAttachmentURLsUsedDetails(0) + {}; + ~LLPanelScriptLimitsAttachment() { }; @@ -233,16 +247,16 @@ public: private: - BOOL mGotAttachmentMemoryUsed; - BOOL mGotAttachmentMemoryUsedDetails; - BOOL mGotAttachmentMemoryMax; + bool mGotAttachmentMemoryUsed; + bool mGotAttachmentMemoryUsedDetails; + bool mGotAttachmentMemoryMax; S32 mAttachmentMemoryMax; S32 mAttachmentMemoryUsed; S32 mAttachmentMemoryUsedDetails; - BOOL mGotAttachmentURLsUsed; - BOOL mGotAttachmentURLsUsedDetails; - BOOL mGotAttachmentURLsMax; + bool mGotAttachmentURLsUsed; + bool mGotAttachmentURLsUsedDetails; + bool mGotAttachmentURLsMax; S32 mAttachmentURLsMax; S32 mAttachmentURLsUsed; S32 mAttachmentURLsUsedDetails; -- cgit v1.2.3 From 1307c384ad1d039de19007237f2670fc757ef2ad Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:04:56 +0000 Subject: more BOOL->bool for CID-426 --- indra/newview/llfloaterscriptlimits.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 28a7194faf..0cba4d72f2 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -148,8 +148,8 @@ public: : LLPanelScriptLimitsInfo(), LLRemoteParcelInfoObserver(), mParcelId(LLUUID()), - mGotParcelMemoryUsed(FALSE), - mGotParcelMemoryMax(FALSE), + mGotParcelMemoryUsed(false), + mGotParcelMemoryMax(false), mParcelMemoryMax(0), mParcelMemoryUsed(0) {}; @@ -180,16 +180,16 @@ private: LLSD mContent; LLUUID mParcelId; - BOOL mGotParcelMemoryUsed; - BOOL mGotParcelMemoryUsedDetails; - BOOL mGotParcelMemoryMax; + bool mGotParcelMemoryUsed; + bool mGotParcelMemoryUsedDetails; + bool mGotParcelMemoryMax; S32 mParcelMemoryMax; S32 mParcelMemoryUsed; S32 mParcelMemoryUsedDetails; - BOOL mGotParcelURLsUsed; - BOOL mGotParcelURLsUsedDetails; - BOOL mGotParcelURLsMax; + bool mGotParcelURLsUsed; + bool mGotParcelURLsUsedDetails; + bool mGotParcelURLsMax; S32 mParcelURLsMax; S32 mParcelURLsUsed; S32 mParcelURLsUsedDetails; -- cgit v1.2.3 From f8e22b3e285c08e95ed8cedfeeff4912c8b82b58 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 10 Feb 2010 12:15:05 -0500 Subject: EXT-5301 log spam when wearing alpha mask added additional check on no host for texture error so that we don't trigger it for IMG_INVISIBLE. code reviewed by Seraph --- indra/newview/llvoavatar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4235f97eab..afe325856b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4048,6 +4048,7 @@ void LLVOAvatar::updateTextures() // Spam if this is a baked texture, not set to default image, without valid host info if (isIndexBakedTexture((ETextureIndex)texture_index) && imagep->getID() != IMG_DEFAULT_AVATAR + && imagep->getID() != IMG_INVISIBLE && !imagep->getTargetHost().isOk()) { LL_WARNS_ONCE("Texture") << "LLVOAvatar::updateTextures No host for texture " -- cgit v1.2.3 From 797823f600621c4c22b5a3c20bad3e48c1f3be1a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:18:10 +0000 Subject: CID-422 Checker: NULL_RETURNS Function: LLGestureBridge::performAction(LLFolderView *, LLInventoryModel *, std::basic_string, std::allocator>) File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 035b2a12ee..0b0e3be675 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3816,7 +3816,12 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode BOOL inform_server = TRUE; BOOL deactivate_similar = FALSE; LLGestureManager::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID)); - LLGestureManager::instance().activateGestureWithAsset(mUUID, gInventory.getItem(mUUID)->getAssetUUID(), inform_server, deactivate_similar); + LLViewerInventoryItem* item = gInventory.getItem(mUUID); + llassert(item); + if (item) + { + LLGestureManager::instance().activateGestureWithAsset(mUUID, item->getAssetUUID(), inform_server, deactivate_similar); + } } else { -- cgit v1.2.3 From bf2aad17ac9fba1da60c209f81b8659ee4649bd0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:19:38 +0000 Subject: CID-421 Checker: NULL_RETURNS Function: LLPanelPlaces::showAddedLandmarkInfo(const std::vector> &) File: /indra/newview/llpanelplaces.cpp --- indra/newview/llpanelplaces.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index c0491cc00f..17a970cfcf 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1015,7 +1015,8 @@ void LLPanelPlaces::showAddedLandmarkInfo(const std::vector& items) LLInventoryItem* item = gInventory.getItem(item_id); - if (LLAssetType::AT_LANDMARK == item->getType()) + llassert(item); + if (item && (LLAssetType::AT_LANDMARK == item->getType()) ) { // Created landmark is passed to Places panel to allow its editing. // If the panel is closed we don't reopen it until created landmark is loaded. -- cgit v1.2.3 From 7786c8638a107953b779dbbedc39a4dfa85f5848 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:21:08 +0000 Subject: CID-420 Checker: NULL_RETURNS Function: open_inventory_offer(const std::vector> &, const std::basic_string, std::allocator>&) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d9b5344dd4..29301e4d1c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -867,6 +867,10 @@ void open_inventory_offer(const std::vector& items, const std::string& f } LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. -- cgit v1.2.3 From 1562b12b6ca7aa5687e44ef0a99cbfbce3bb1cb4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:23:53 +0000 Subject: CID-408 Checker: UNUSED_VALUE Function: LLOfferInfo::inventory_task_offer_callback(const LLSD &, const LLSD &) File: /indra/newview/llviewermessage.cpp dead code. --- indra/newview/llviewermessage.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 29301e4d1c..8aa642bdb6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1306,13 +1306,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); LLInventoryObserver* opener = NULL; - LLViewerInventoryCategory* catp = NULL; - catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID); - LLViewerInventoryItem* itemp = NULL; - if(!catp) - { - itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); - } std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. -- cgit v1.2.3 From 4cfb57bf9bbb11659c35b7b378dcd4d92eeb96c8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:24:55 +0000 Subject: CID-411 Checker: UNUSED_VALUE Function: LLNameListCtrl::refresh(const LLUUID &, const std::basic_string, std::allocator>&, const std::basic_string, std::allocator>&, int) File: /indra/newview/llnamelistctrl.cpp dead code. --- indra/newview/llnamelistctrl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 40e8b64362..114fef8712 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -339,8 +339,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first, LLScrollListItem* item = *iter; if (item->getUUID() == id) { - LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0); - cell = item->getColumn(mNameColumnIndex); + LLScrollListCell* cell = item->getColumn(mNameColumnIndex); if (cell) { cell->setValue(fullname); -- cgit v1.2.3 From d398131bd753b05045dc9ca7e9bcaf3d2d4daf99 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:31:51 +0000 Subject: CID-96 --- indra/newview/llagentwearables.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index d560331392..71fc62b04b 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -310,21 +310,24 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, return; LLUUID old_item_id = getWearableItemID((EWearableType)type,index); + if (wearable) { wearable->setItemID(item_id); - } - if (old_item_id.notNull()) - { - gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - setWearable((EWearableType)type,index,wearable); - } - else - { - pushWearable((EWearableType)type,wearable); + if (old_item_id.notNull()) + { + gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); + setWearable((EWearableType)type,index,wearable); + } + else + { + pushWearable((EWearableType)type,wearable); + } } + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLViewerInventoryItem* item = gInventory.getItem(item_id); if (item && wearable) { -- cgit v1.2.3 From 612df63956a0758548d5291af72fb3ef9b06282a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:33:28 +0000 Subject: CID-97 Checker: FORWARD_NULL Function: LLAgentWearables::setWearableOutfit(const LLDynamicArray, (int)32> &, LLDynamicArray&, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 71fc62b04b..6620780b27 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1621,8 +1621,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } if (new_wearable) + { new_wearable->setItemID(new_item->getUUID()); - setWearable(type,0,new_wearable); + setWearable(type,0,new_wearable); + } } std::vector wearables_being_removed; -- cgit v1.2.3 From 143de8db4e02d1341afc3d1fb590d2c4483d585d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:35:34 +0000 Subject: CID-96 Checker: FORWARD_NULL Function: LLDriverParam::getNextDistortion(unsigned int *, LLPolyMesh **) File: /indra/newview/lldriverparam.cpp --- indra/newview/lldriverparam.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 8ebfa471f3..830e975e8a 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -432,6 +432,12 @@ const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_ } } + llassert(driven); + if (!driven) + { + return NULL; // shouldn't happen, but... + } + // We're already in the middle of a param's distortions, so get the next one. const LLVector3* v = driven->mParam->getNextDistortion( index, poly_mesh ); if( (!v) && (iter != mDriven.end()) ) -- cgit v1.2.3 From 8419c4ec8aac52214a1a21bb3c00f4dc60fc8b6b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:36:40 +0000 Subject: CID-95 Checker: FORWARD_NULL Function: LLFloaterMediaSettings::commitFields() File: /indra/newview/llfloatermediasettings.cpp --- indra/newview/llfloatermediasettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 7388f7ea3f..62ec17f89a 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -207,7 +207,7 @@ void LLFloaterMediaSettings::commitFields() if (hasFocus()) { LLUICtrl* cur_focus = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (cur_focus->acceptsTextInput()) + if (cur_focus && cur_focus->acceptsTextInput()) { cur_focus->onCommit(); }; -- cgit v1.2.3 From 6bd628dc57389286090e4b48c919aa314a1ea278 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:40:56 +0000 Subject: CID-93 Checker: FORWARD_NULL Function: LLFloaterPreference::onBtnOK() File: /indra/newview/llfloaterpreference.cpp --- indra/newview/llfloaterpreference.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9d9fbacee3..03555d4c4e 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -602,7 +602,7 @@ void LLFloaterPreference::onBtnOK() if (hasFocus()) { LLUICtrl* cur_focus = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (cur_focus->acceptsTextInput()) + if (cur_focus && cur_focus->acceptsTextInput()) { cur_focus->onCommit(); } -- cgit v1.2.3 From 8fec8c46df9533c30bf97bc6da0f1f8701c440e9 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:42:07 +0000 Subject: CID-92 Checker: FORWARD_NULL Function: LLFloaterPreference::onBtnCancel() File: /indra/newview/llfloaterpreference.cpp CID-91 Checker: FORWARD_NULL Function: LLFloaterPreference::onBtnApply() File: /indra/newview/llfloaterpreference.cpp --- indra/newview/llfloaterpreference.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 03555d4c4e..3c9f7492a2 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -635,7 +635,7 @@ void LLFloaterPreference::onBtnApply( ) if (hasFocus()) { LLUICtrl* cur_focus = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (cur_focus->acceptsTextInput()) + if (cur_focus && cur_focus->acceptsTextInput()) { cur_focus->onCommit(); } @@ -652,7 +652,7 @@ void LLFloaterPreference::onBtnCancel() if (hasFocus()) { LLUICtrl* cur_focus = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (cur_focus->acceptsTextInput()) + if (cur_focus && cur_focus->acceptsTextInput()) { cur_focus->onCommit(); } -- cgit v1.2.3 From 5707b71d090306d05dd09933985294e8c7d136a9 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:44:18 +0000 Subject: CID-90 Checker: FORWARD_NULL Function: LLCallingCardBridge::buildContextMenu(LLMenuGL &, unsigned int) File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0b0e3be675..59ca6063c8 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3627,9 +3627,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) LLInventoryItem* item = getItem(); BOOL good_card = (item - && (LLUUID::null != item->getCreatorUUID()) - && (item->getCreatorUUID() != gAgent.getID())); - BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); + && (LLUUID::null != item->getCreatorUUID()) + && (item->getCreatorUUID() != gAgent.getID())); + BOOL user_online = FALSE; + if (item) + { + user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); + } items.push_back(std::string("Send Instant Message Separator")); items.push_back(std::string("Send Instant Message")); items.push_back(std::string("Offer Teleport...")); -- cgit v1.2.3 From ed26b11f6867d8938afd214ef9b5da80f7ef7be7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:45:50 +0000 Subject: CID-89 Checker: FORWARD_NULL Function: LLObjectBridge::performAction(LLFolderView *, LLInventoryModel *, std::basic_string, std::allocator>) File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 59ca6063c8..db182ae8d3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4068,12 +4068,13 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); gMessageSystem->sendReliable( gAgent.getRegion()->getHost()); - } - // this object might have been selected, so let the selection manager know it's gone now - LLViewerObject *found_obj = gObjectList.findObject(item->getLinkedUUID()); - if (found_obj) - { - LLSelectMgr::getInstance()->remove(found_obj); + + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject(item->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + } } } else LLItemBridge::performAction(folder, model, action); -- cgit v1.2.3 From 6e73357a866f0c9fdc8f482c9cffc0e409b76be0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:48:03 +0000 Subject: CID-88 Checker: FORWARD_NULL Function: LLItemBridge::restoreToWorld() File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index db182ae8d3..5d2a1b7a41 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1113,6 +1113,9 @@ void LLItemBridge::restoreItem() void LLItemBridge::restoreToWorld() { + //Similar functionality to the drag and drop rez logic + bool remove_from_inventory = false; + LLViewerInventoryItem* itemp = (LLViewerInventoryItem*)getItem(); if (itemp) { @@ -1125,23 +1128,20 @@ void LLItemBridge::restoreToWorld() msg->nextBlockFast(_PREHASH_InventoryData); itemp->packMessage(msg); msg->sendReliable(gAgent.getRegion()->getHost()); - } - - //Similar functionality to the drag and drop rez logic - BOOL remove_from_inventory = FALSE; - - //remove local inventory copy, sim will deal with permissions and removing the item - //from the actual inventory if its a no-copy etc - if(!itemp->getPermissions().allowCopyBy(gAgent.getID())) - { - remove_from_inventory = TRUE; - } - // Check if it's in the trash. (again similar to the normal rez logic) - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id)) - { - remove_from_inventory = TRUE; + //remove local inventory copy, sim will deal with permissions and removing the item + //from the actual inventory if its a no-copy etc + if(!itemp->getPermissions().allowCopyBy(gAgent.getID())) + { + remove_from_inventory = true; + } + + // Check if it's in the trash. (again similar to the normal rez logic) + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id)) + { + remove_from_inventory = true; + } } if(remove_from_inventory) -- cgit v1.2.3 From 664c659601a9e07d3002cfb65f1624ef24342f4a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:59:01 +0000 Subject: CID-87 Checker: FORWARD_NULL Function: LLLocationInputCtrl::refreshLocation() File: /indra/newview/lllocationinputctrl.cpp --- indra/newview/lllocationinputctrl.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index ff713d74ad..f48c96190f 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -489,7 +489,10 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) */ void LLLocationInputCtrl::setText(const LLStringExplicit& text) { - mTextEntry->setText(text); + if (mTextEntry) + { + mTextEntry->setText(text); + } mHasAutocompletedText = FALSE; } @@ -498,7 +501,9 @@ void LLLocationInputCtrl::setFocus(BOOL b) LLComboBox::setFocus(b); if (mTextEntry && b && !mList->getVisible()) + { mTextEntry->setFocus(TRUE); + } } void LLLocationInputCtrl::handleLoginComplete() @@ -688,8 +693,8 @@ void LLLocationInputCtrl::refreshLocation() { // Is one of our children focused? if (LLUICtrl::hasFocus() || mButton->hasFocus() || mList->hasFocus() || - (mTextEntry && mTextEntry->hasFocus()) || (mAddLandmarkBtn->hasFocus())) - + (mTextEntry && mTextEntry->hasFocus()) || + (mAddLandmarkBtn->hasFocus())) { llwarns << "Location input should not be refreshed when having focus" << llendl; return; -- cgit v1.2.3 From d928ed69a9083c16535aba848e29aaa87d9b1119 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:00:06 +0000 Subject: CID-86 Checker: FORWARD_NULL Function: LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel *) File: /indra/newview/llpanellandmarks.cpp --- indra/newview/llpanellandmarks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 7c1b0f6234..f1cb6e87a3 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -526,9 +526,10 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list { root_folder->setupMenuHandle(LLInventoryType::IT_CATEGORY, mGearFolderMenu->getHandle()); root_folder->setupMenuHandle(LLInventoryType::IT_LANDMARK, mGearLandmarkMenu->getHandle()); + + root_folder->setParentLandmarksPanel(this); } - root_folder->setParentLandmarksPanel(this); inventory_list->saveFolderState(); } -- cgit v1.2.3 From 284cab7f0fef170b1bdd39c975fb236784c536aa Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:01:46 +0000 Subject: CID-82 Checker: FORWARD_NULL Function: LLFolderBridge::pasteFromClipboard() File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5d2a1b7a41..9cfd5fc3ab 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2429,7 +2429,9 @@ void LLFolderBridge::pasteFromClipboard() { // move_inventory_item() is not enough, //we have to update inventory locally too - changeItemParent(model, dynamic_cast(item), parent_id, FALSE); + LLViewerInventoryItem* viitem = dynamic_cast(item); + llassert(viitem); + changeItemParent(model, viitem, parent_id, FALSE); } else { -- cgit v1.2.3 From ef515029b69029952a2243a5270543752a87334e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:05:49 +0000 Subject: CID-80 Checker: FORWARD_NULL Function: LLSidepanelAppearance::onOpen(const LLSD &) File: /indra/newview/llsidepanelappearance.cpp --- indra/newview/llsidepanelappearance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 43215f86bd..cd4a821774 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -278,7 +278,7 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible) return; mLookInfo->setVisible(visible); - mPanelOutfitsInventory->setVisible(!visible); + if (mPanelOutfitsInventory) mPanelOutfitsInventory->setVisible(!visible); mFilterEditor->setVisible(!visible); mEditBtn->setVisible(!visible); mNewOutfitBtn->setVisible(!visible); @@ -305,7 +305,7 @@ void LLSidepanelAppearance::updateVerbs() { bool is_look_info_visible = mLookInfo->getVisible(); - if (!is_look_info_visible) + if (mPanelOutfitsInventory && !is_look_info_visible) { const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); mEditBtn->setEnabled(is_correct_type); -- cgit v1.2.3 From 54ba657e170614f5f18c84474734a5f97dedcac9 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:07:54 +0000 Subject: CID-71 Checker: FORWARD_NULL Function: LLFace::getGeometryVolume(const LLVolume &, const int &, const LLMatrix4 &, const LLMatrix3 &, const unsigned short &) File: /indra/newview/llface.cpp --- indra/newview/llface.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 965ac1cad0..4a540fbe58 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1040,17 +1040,20 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_color) { - GLfloat alpha[4] = - { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; - - if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + if (tep) { - color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; + + if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + { + color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + } } } -- cgit v1.2.3 From 5afe94fec4f884d9e645da6cff1dd9f78420d290 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:10:38 +0000 Subject: CID-70 Checker: FORWARD_NULL Function: LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject&) File: /indra/newview/lllocaltextureobject.cpp not a bug. --- indra/newview/lllocaltextureobject.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/lllocaltextureobject.cpp b/indra/newview/lllocaltextureobject.cpp index 69eb5fce2f..116d9bc446 100644 --- a/indra/newview/lllocaltextureobject.cpp +++ b/indra/newview/lllocaltextureobject.cpp @@ -70,6 +70,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) : if (!original_layer) { llerrs << "could not clone Local Texture Object: unable to extract texlayer!" << llendl; + continue; } LLTexLayer* new_layer = new LLTexLayer(*original_layer); -- cgit v1.2.3 From 1d66e3a1fba1d3ea5b47ae4fc54e752cdba9e540 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:11:35 +0000 Subject: CID-69 Checker: FORWARD_NULL Function: LLFace::switchTexture(LLViewerTexture *) File: /indra/newview/llface.cpp not a bug. --- indra/newview/llface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4a540fbe58..d12fd48ffb 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -301,7 +301,8 @@ void LLFace::switchTexture(LLViewerTexture* new_texture) if(!new_texture) { - llerrs << "Can not switch to a null texture." << llendl ; + llerrs << "Can not switch to a null texture." << llendl; + return; } new_texture->addTextureStats(mTexture->getMaxVirtualSize()) ; -- cgit v1.2.3 From 51499b555a64b5616edc52ff3150b820f8dafaef Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:12:15 +0000 Subject: CID-65 Checker: FORWARD_NULL Function: LLAgent::sendMessage() File: /indra/newview/llagent.cpp not a bug. --- indra/newview/llagent.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a061744f7c..59f61dfdfb 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -956,6 +956,7 @@ void LLAgent::sendMessage() if (!mRegionp) { llerrs << "No region for agent yet!" << llendl; + return; } gMessageSystem->sendMessage(mRegionp->getHost()); } -- cgit v1.2.3 From b7b2d2b3ee097a4c7c7bc689538a5e0707c2978a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:31:34 +0000 Subject: CID-152 Checker: NULL_RETURNS Function: LLSpatialBridge::updateMove() File: /indra/newview/lldrawable.cpp --- indra/newview/lldrawable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..f38c92abb5 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1367,10 +1367,14 @@ BOOL LLSpatialBridge::updateMove() { llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); mOctree->balance(); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->move(this, getSpatialGroup(), TRUE); + if (part) + { + part->move(this, getSpatialGroup(), TRUE); + } return TRUE; } -- cgit v1.2.3 From 3aa6150e80287a41e2b48b9bf30f86dfc025277a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:33:21 +0000 Subject: CID-142 Checker: NULL_RETURNS Function: LLFolderBridge::determineFolderType() File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9cfd5fc3ab..749e1ce3f3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2232,7 +2232,10 @@ void LLFolderBridge::determineFolderType() { LLInventoryModel* model = getInventoryModel(); LLViewerInventoryCategory* category = model->getCategory(mUUID); - category->determineFolderType(); + if (category) + { + category->determineFolderType(); + } } } -- cgit v1.2.3 From 4139e2692605e225ba5d289007f2d50d429697c7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Feb 2010 10:34:33 -0800 Subject: change the cache version number to force to clear old cache. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9f5c6cc441..00a9e4d745 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3004,7 +3004,7 @@ bool LLAppViewer::initCache() // Purge cache if it belongs to an old version else { - static const S32 cache_version = 5; + static const S32 cache_version = 6; if (gSavedSettings.getS32("LocalCacheVersion") != cache_version) { mPurgeCache = true; -- cgit v1.2.3 From 1fcc26d570435817b0ce8c84dbec590b960298be Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:35:29 +0000 Subject: CID-141 Checker: NULL_RETURNS Function: LLFolderBridge::folderOptionsMenu() File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 749e1ce3f3..da95eaefca 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2506,11 +2506,13 @@ void LLFolderBridge::folderOptionsMenu() if(!model) return; const LLInventoryCategory* category = model->getCategory(mUUID); + if(!category) return; + LLFolderType::EType type = category->getPreferredType(); - const bool is_system_folder = category && LLFolderType::lookupIsProtectedType(type); + const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); // BAP change once we're no longer treating regular categories as ensembles. - const bool is_ensemble = category && (type == LLFolderType::FT_NONE || - LLFolderType::lookupIsEnsembleType(type)); + const bool is_ensemble = (type == LLFolderType::FT_NONE || + LLFolderType::lookupIsEnsembleType(type)); // calling card related functionality for folders. -- cgit v1.2.3 From e7c9f674945533e4a56313b74746886bdb724be2 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:40:13 +0000 Subject: CID-136 Checker: NULL_RETURNS Function: LLInventorySort::operator ()(const LLFolderViewItem *const &, const LLFolderViewItem *const &) File: /indra/newview/llfolderviewitem.cpp --- indra/newview/llfolderviewitem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 20cb2d3604..2a77835373 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2544,8 +2544,12 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde { // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem // or to LLInvFVBridge - S32 a_sort = (static_cast(a->getListener()))->getItem()->getSortField(); - S32 b_sort = (static_cast(b->getListener()))->getItem()->getSortField(); + LLViewerInventoryItem* aitem = (static_cast(a->getListener()))->getItem(); + LLViewerInventoryItem* bitem = (static_cast(b->getListener()))->getItem(); + if (!aitem || !bitem) + return false; + S32 a_sort = (aitem->getSortField(); + S32 b_sort = (bitem->getSortField(); return a_sort < b_sort; } } -- cgit v1.2.3 From cd627804576a3b58377ec6cca31837cc556939d4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:41:54 +0000 Subject: bracket fix. --- indra/newview/llfolderviewitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 2a77835373..3946224c0c 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2548,8 +2548,8 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde LLViewerInventoryItem* bitem = (static_cast(b->getListener()))->getItem(); if (!aitem || !bitem) return false; - S32 a_sort = (aitem->getSortField(); - S32 b_sort = (bitem->getSortField(); + S32 a_sort = aitem->getSortField(); + S32 b_sort = bitem->getSortField(); return a_sort < b_sort; } } -- cgit v1.2.3 From eeb480085809978c8711242d30b660a80ced123b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:43:13 +0000 Subject: CID-130 Checker: NULL_RETURNS Function: LLSpatialBridge::LLSpatialBridge(LLDrawable *, int, unsigned int) File: /indra/newview/lldrawable.cpp --- indra/newview/lldrawable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index f38c92abb5..9fbc3408d7 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1049,9 +1049,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->put(this); + if (part) + { + part->put(this); + } } LLSpatialBridge::~LLSpatialBridge() -- cgit v1.2.3