EXT-3303 : Crash on select object inventory root folder and hover Build menu

Unsafe cast (which has existed since viewer1.23) was causing crash.
meow-7.2.2
Loren Shih 2009-12-09 19:37:58 -05:00
parent 9abe779c8a
commit ac4a6c93f0
1 changed files with 2 additions and 1 deletions

View File

@ -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);