Commits

Vadim Savchuk committed 0c74f2c

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).

Comments (0)

Files changed (1)

indra/newview/llviewerobject.cpp

 			}
 			else 
 			{
-				gAgentAvatarp->updateRegion(regionp);
+				if (isAgentAvatarValid())
+				{
+					gAgentAvatarp->updateRegion(regionp);
+				}
 			}
 			res = gAgentAvatarp;
 		}