summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-09 19:37:58 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-09 19:37:58 -0500
commitac4a6c93f08a987303dc049b5d8a1ea2342c6397 (patch)
treec5c82a958f10885b0f7f46673a1503a3c9f552b1
parent9abe779c8a06696ecc6b00313a443fabc22cf234 (diff)
EXT-3303 : Crash on select object inventory root folder and hover Build menu
Unsafe cast (which has existed since viewer1.23) was causing crash.
-rw-r--r--indra/newview/llpanelobjectinventory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 9d38dab26e..43366ef814 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -157,7 +157,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
- return (LLInventoryItem*)(object->getInventoryObject(mUUID));
+ return dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
}
return NULL;
}
@@ -712,6 +712,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual const std::string& getDisplayName() const { return getName(); }
virtual BOOL isItemRenameable() const;
+ // virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL renameItem(const std::string& new_name);
virtual BOOL isItemRemovable();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);