diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-21 16:16:54 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-21 16:16:54 -0700 |
commit | abf1bf79f2d45ba42389397f9013d5552f7d672d (patch) | |
tree | 5cce8f923edda9a424db1ea1f84dfa32f3e7c2c0 /indra/llui | |
parent | 4a2fb4c64f2079089b78202e53bbe1dbe8ac09c7 (diff) |
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).
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index b9256dd890..1c74395c66 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1059,10 +1059,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // Convert drag position into insert position and rank if (!isReadOnly() && handled && !drop) { - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - LLAssetType::EType type = inv_item->getType(); - if (type == LLAssetType::AT_WIDGET) + if (cargo_type == DAD_WIDGET) { + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; LLCommandId dragged_command(inv_item->getUUID()); int orig_rank = getRankFromPosition(dragged_command); mDragRank = getRankFromPosition(x, y); |