From 60393abdad98c61d9cb01d004e3d69bd8d34bfda Mon Sep 17 00:00:00 2001
From: Nicky <none@none>
Date: Fri, 13 Jul 2012 13:37:18 +0200
Subject: [PATCH] Crashfix: In LLAttachmentsMgr::onIdle make sure we've a valid
 region before dereferencing it.

---
 indra/newview/llattachmentsmgr.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp
index c9543988a68..ea0b8f00a43 100644
--- a/indra/newview/llattachmentsmgr.cpp
+++ b/indra/newview/llattachmentsmgr.cpp
@@ -62,6 +62,12 @@ void LLAttachmentsMgr::onIdle(void *)
 
 void LLAttachmentsMgr::onIdle()
 {
+	// Make sure we got a region before trying anything else
+	if( !gAgent.getRegion() )
+	{
+		return;
+	}
+
 	S32 obj_count = mPendingAttachments.size();
 	if (obj_count == 0)
 	{
-- 
GitLab