From e19c983a119c33372ac5c8c161d563611b5a5e43 Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Wed, 23 Sep 2009 19:03:26 +0000
Subject: [PATCH] * EXT-1037 -  Left-clicking anywhere in in-world area resets
 camera position NOTE: Temporary fix that may break MOAP behavior. Needs to be
 reviewd and potentially designed.

---
 indra/newview/llviewermediafocus.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index 60eabd730fc..e7576d5c767 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -115,11 +115,14 @@ void LLViewerMediaFocus::setFocusFace( BOOL b, LLPointer<LLViewerObject> objectp
 	else
 	{
 		gFocusMgr.setKeyboardFocus(NULL);
-		mFocus = NULL;
 		if(! parcel->getMediaPreventCameraZoom())
 		{
-			gAgent.setFocusOnAvatar(TRUE, ANIMATE);
+			if (!mFocus->isEmpty())
+			{
+				gAgent.setFocusOnAvatar(TRUE, ANIMATE);
+			}
 		}
+		mFocus = NULL;
 		// LLViewerMedia::remObserver(this, mObjectID);
 		
 		// Null out the media hud media pointer
-- 
GitLab