From 832ed49f5bb6683323be0ababf8984b2f0701108 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 16 Sep 2011 13:03:10 -0400 Subject: SH-2440 FIX - avoid calling initInstance() on LLVOAvatarSelf if it already exists --- indra/newview/llviewerobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llviewerobject.cpp (limited to 'indra') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp old mode 100644 new mode 100755 index cd71b6d42a..99a641844f --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -140,6 +140,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco if (!gAgentAvatarp) { gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp); + gAgentAvatarp->initInstance(); } else { @@ -150,8 +151,8 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco else { res = new LLVOAvatar(id, pcode, regionp); + res->initInstance(); } - static_cast(res)->initInstance(); break; } case LL_PCODE_LEGACY_GRASS: -- cgit v1.2.3 From 77eb3aae04b276369aea70d2931f6aed7352d823 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 16 Sep 2011 13:14:30 -0400 Subject: SH-2440 FIX - first build, then test, then commit --- indra/newview/llviewerobject.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 99a641844f..db7bb002c1 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -150,8 +150,9 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - res = new LLVOAvatar(id, pcode, regionp); - res->initInstance(); + LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); + avatar->initInstance(); + res = avatar; } break; } -- cgit v1.2.3