summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-10 14:02:21 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-10 14:02:21 +0100
commitc890ca021a49e52095e9a8de7db528e48c3da205 (patch)
tree1e5227e803980b3df83a77e0d0c39623e0fa2069 /indra/newview/llviewermenu.cpp
parent60b12a24d4a6061a3fe22a433cb8852002a8e857 (diff)
parent20bdbd487e9c64ce553ad68d467b1100342fe6a1 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp3
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();
}