From eb9e6e295d058a1f331f04f89cffd4898b1561e7 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 30 Mar 2012 15:45:54 +0300 Subject: MAINT-813 FIXED Potential fix for a crash at LLViewerRegion::getPosGlobalFromRegion. As far as I can tell, if login fails with the "Region has begun the logout process" message, gAgentAvatarp gets destroyed, which leads to the crash. Adding a check that should prevent it (could not reproduce to make sure). --- indra/newview/llviewerobject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 37fb77a10a..e590f29a9a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -143,7 +143,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - gAgentAvatarp->updateRegion(regionp); + if (isAgentAvatarValid()) + { + gAgentAvatarp->updateRegion(regionp); + } } res = gAgentAvatarp; } -- cgit v1.2.3