Skip to content
Snippets Groups Projects
Commit abf1bf79 authored by Gilbert Gonzales's avatar Gilbert Gonzales
Browse files

CHUI-881 ([CHUIBUG]Viewer crashes when user drag and drop the participant from...

CHUI-881 ([CHUIBUG]Viewer crashes when user drag and drop the participant from the people floater to the one of the tool bars): Problem was that the item dragged from the people list was not of type inventoryitem. Instead of casting to an inventoryitem and checking if the item being dragged is a widgit, instead look at the cargo type (which also specifies that the dragged item is a widgit but doesn't need to typecast).
parent 4a2fb4c6
No related branches found
No related tags found
No related merge requests found
...@@ -1059,10 +1059,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, ...@@ -1059,10 +1059,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// Convert drag position into insert position and rank // Convert drag position into insert position and rank
if (!isReadOnly() && handled && !drop) if (!isReadOnly() && handled && !drop)
{ {
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; if (cargo_type == DAD_WIDGET)
LLAssetType::EType type = inv_item->getType();
if (type == LLAssetType::AT_WIDGET)
{ {
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
LLCommandId dragged_command(inv_item->getUUID()); LLCommandId dragged_command(inv_item->getUUID());
int orig_rank = getRankFromPosition(dragged_command); int orig_rank = getRankFromPosition(dragged_command);
mDragRank = getRankFromPosition(x, y); mDragRank = getRankFromPosition(x, y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment