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
parent
9e53fcdc90
commit
2aa9ecb602
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue