EXT-5867 : Crash when clicking and dragging root folder of object contents into build floater

Simple fix to use dynamic cast - the previous unsafe static cast was treating folders as if they were items and then querying permissions, which don't exist for folders.
This code actually existed back in 1.23 but by some stroke of luck worked.
master
Loren Shih 2010-03-08 17:38:50 -05:00
parent 9e53fcdc90
commit 2aa9ecb602
1 changed files with 2 additions and 2 deletions

View File

@ -770,8 +770,8 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
LLInventoryItem* inv = NULL;
if((inv = (LLInventoryItem*)object->getInventoryObject(mUUID)))
const LLInventoryItem *inv = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
if (inv)
{
const LLPermissions& perm = inv->getPermissions();
bool can_copy = gAgent.allowOperation(PERM_COPY, perm,