diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-03-08 17:38:50 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-03-08 17:38:50 -0500 |
commit | aac32b2fa3a16de37b0f2ce2b3737daa1cc6306e (patch) | |
tree | 1f8999db6c722d1c04420c5dd009c3492c32e3be /indra/newview | |
parent | 9c8416b34ea6cc89c330b0607552a2d79a409468 (diff) |
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.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5ddbdf7f01..6fcba80845 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -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, |