From d2996b685972e2b066e6821d0bc258073d8ceb1d Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 12 Mar 2010 13:17:30 -0600
Subject: [PATCH] EXT-6276 Fix for UI going all wonky.

---
 indra/llrender/llrender.cpp | 10 +++++++++-
 indra/llui/llclipboard.cpp  |  2 --
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 26282b0ee35..c3540a717cb 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -866,7 +866,15 @@ void LLRender::scaleUI(F32 x, F32 y, F32 z)
 
 void LLRender::pushUIMatrix()
 {
-	mUIOffset.push_front(mUIOffset.front());
+	if (mUIOffset.empty())
+	{
+		mUIOffset.push_front(LLVector3(0,0,0));
+	}
+	else
+	{
+		mUIOffset.push_front(mUIOffset.front());
+	}
+	
 	if (mUIScale.empty())
 	{
 		mUIScale.push_front(LLVector3(1,1,1));
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 400b899ef27..cbd4cb380f6 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -103,11 +103,9 @@ BOOL LLClipboard::canPasteString() const
 
 void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id )
 {
-#if !LL_DARWIN
 	mSourceID = source_id;
 	mString = src.substr(pos, len);
 	LLView::getWindow()->copyTextToPrimary( mString );
-#endif
 }
 
 
-- 
GitLab