diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 18:10:36 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 18:10:36 +0300 |
commit | 554d543b020cfd8e99322c57806b19247bce2f8b (patch) | |
tree | efdadf33a852f247e074e1ea847b74dd3952139d /indra/newview/llviewermenu.cpp | |
parent | fe96d9a47496e439e0937feb4c29336052cc38f2 (diff) |
EXT-8577 FIXED Context menu items for multi-attachments
Changes:
* Implemented bulk-add from My Appearance SP.
* Made sure there's no memleak when you click Wear/Attach in the in-world object context menu
and the callback isn't invoked (because e.g. avatar fails to get close enough to the object).
I stated that in comments.
Reviewed by Seraph at https://codereview.productengine.com/secondlife/r/844/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 92195f0a4d..a289a0eb7a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5950,7 +5950,8 @@ void LLObjectAttachToAvatar::confirmReplaceAttachment(S32 option, LLViewerJointA delta = delta * 0.5f; walkToSpot -= delta; - CallbackData* user_data = new CallbackData(attachment_point, mReplace); // *TODO: leak if the callback isn't called? + // The callback will be called even if avatar fails to get close enough to the object, so we won't get a memory leak. + CallbackData* user_data = new CallbackData(attachment_point, mReplace); gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, onNearAttachObject, user_data, stop_distance); gAgentCamera.clearFocusObject(); } |