From 1a190182ea657127fdf05eff892546087046da97 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 14 Jun 2010 16:02:55 +0100 Subject: EXT-7851 FIXED Memory leak in LLImagePNG::encode() We were not freeing the temporary image buffer if the PNG encoding failed. This probably doesn't happen very often, but it's good to plug the leak all the same. --- indra/llimage/llimagepng.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index b5de104e61..a6ab246a2c 100644 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp @@ -135,6 +135,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time) if (! pngWrapper.writePng(raw_image, mTmpWriteBuffer)) { setLastError(pngWrapper.getErrorMessage()); + delete[] mTmpWriteBuffer; return FALSE; } -- cgit v1.2.3 From 80a98a100bd934fc73f90f1153de78fe0df93847 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 14 Jun 2010 16:43:06 +0100 Subject: EXT-7853: Made LLMutex destructor virtual. This fixes a potential resource leak whereby the destructor for LLCondition, which derives from LLMutex, is never called. --- indra/llcommon/llthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index adef1a9192..dbb8ec5231 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -135,7 +135,7 @@ class LL_COMMON_API LLMutex { public: LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex - ~LLMutex(); + virtual ~LLMutex(); void lock(); // blocks void unlock(); -- cgit v1.2.3 From fbc95fe7e77ed093f8f7938a4755ce6b175dcaff Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 14 Jun 2010 17:29:22 +0100 Subject: EXT-7855 FIXED Memory leak in llmessage/llhttpclient.cpp We now free the fileBuffer when we're done in VFileInjector::process_impl() --- indra/llmessage/llhttpclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 9c2e4b5658..e8dc207114 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -199,6 +199,7 @@ namespace fileBuffer = new U8 [fileSize]; vfile.read(fileBuffer, fileSize); ostream.write((char*)fileBuffer, fileSize); + delete [] fileBuffer; eos = true; return STATUS_DONE; } -- cgit v1.2.3 From 76cf9e29a77566c10da6184833fad6b0912e9688 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 14 Jun 2010 10:53:28 -0700 Subject: EXT-7799 My Appearance - Edit outfit positions camera to previous camera coordinates reviewed by richard --- indra/newview/llagentcamera.cpp | 18 +++++++++--------- indra/newview/llsidepanelappearance.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index c3f075fd49..977f1c9fa8 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2312,12 +2312,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came startCameraAnimation(); } - // Remove any pitch from the avatar - //LLVector3 at = gAgent.getFrameAgent().getAtAxis(); - //at.mV[VZ] = 0.f; - //at.normalize(); - //gAgent.resetAxes(at); - if (mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR) { updateLastCamera(); @@ -2338,9 +2332,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came if (isAgentAvatarValid()) { if(avatar_animate) - { - // Remove any pitch from the avatar - LLVector3 at = gAgent.getFrameAgent().getAtAxis(); + { + // slamming the avatar's axis to the camera so that when the rotation + // completes it correctly points to the front of the avatar + // Remove any pitch or rotation from the avatar + LLVector3 at = LLViewerCamera::getInstance()->getAtAxis(); at.mV[VZ] = 0.f; at.normalize(); gAgent.resetAxes(at); @@ -2360,6 +2356,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came mAnimationDuration = gSavedSettings.getF32("ZoomTime"); } } + + // this is what sets the avatar as the mFocusTargetGlobal + setFocusGlobal(LLVector3d::zero); + gAgentAvatarp->updateMeshTextures(); } else diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index e23643da0b..445bde1206 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -352,12 +352,12 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we if (visible) { - mEditWearable->setWearable(wearable); - mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToCustomizeAvatar(); } + mEditWearable->setWearable(wearable); + mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency } else { -- cgit v1.2.3