summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-02-05 16:15:43 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-02-05 16:15:43 -0500
commit443993bc19f4517ec41f896443d71110fb6202a7 (patch)
tree12c7513b7b90b1179bd0f3b5f4f36232434648df /indra/newview/llvoavatarself.cpp
parent456bbdfa2f3471896f6981e70a9daa56dae51d18 (diff)
EXT-4739 - Crash on teleport after viewer minimize. Making sure we don't accidentally set av self to null & added a few more null checks.
-Reviewed by nyx
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b1ea8a1bbb..13e28b246a 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -510,8 +510,12 @@ BOOL LLVOAvatarSelf::buildMenus()
LLVOAvatarSelf::~LLVOAvatarSelf()
{
- gAgent.setAvatarObject(NULL);
- gAgentWearables.setAvatarObject(NULL);
+ // gAgents pointer might have been set to a different Avatar Self, don't get rid of it if so.
+ if (gAgent.getAvatarObject() == this)
+ {
+ gAgent.setAvatarObject(NULL);
+ gAgentWearables.setAvatarObject(NULL);
+ }
delete mScreenp;
mScreenp = NULL;
}