summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-02-21 09:55:30 -0500
committerOz Linden <oz@lindenlab.com>2012-02-21 09:55:30 -0500
commit5f85e7a82458fff56aa79f7e7fe2986edc069ca3 (patch)
tree01c9c6b6f6cb06b828d4e1d539b455a6a7ac7e9c /indra
parent1074219c8a44cbf6f3b1b0a68dd0ca8c656465fa (diff)
parent52782548c83dc0ca0fc8352e1a3ad68784116a91 (diff)
merge changes for SH-2973
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/lldriverparam.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp10
-rw-r--r--indra/newview/llvoavatarself.cpp5
-rw-r--r--indra/newview/llvoavatarself.h2
-rw-r--r--indra/newview/llwearable.cpp2
6 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 49fbdbf1df..1174d108d2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1487,6 +1487,9 @@ void LLAppViewer::flushVFSIO()
bool LLAppViewer::cleanup()
{
+ //ditch LLVOAvatarSelf instance
+ gAgentAvatarp = NULL;
+
// workaround for DEV-35406 crash on shutdown
LLEventPumps::instance().reset();
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index 8f47d3c5e5..64eb11fc9b 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -139,7 +139,7 @@ void LLDriverParamInfo::toStream(std::ostream &out)
}
else
{
- llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << gAgentAvatarp << " for driver parameter " << getID() << llendl;
+ llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << gAgentAvatarp.get() << " for driver parameter " << getID() << llendl;
}
out << std::endl;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8a713ae22c..e0653fec30 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2021,6 +2021,12 @@ void LLViewerWindow::shutdownGL()
gSky.cleanup();
stop_glerror();
+ llinfos << "Cleaning up pipeline" << llendl;
+ gPipeline.cleanup();
+ stop_glerror();
+
+ //MUST clean up pipeline before cleaning up wearables
+ llinfos << "Cleaning up wearables" << llendl;
LLWearableList::instance().cleanup() ;
gTextureList.shutdown();
@@ -2031,10 +2037,6 @@ void LLViewerWindow::shutdownGL()
LLWorldMapView::cleanupTextures();
- llinfos << "Cleaning up pipeline" << llendl;
- gPipeline.cleanup();
- stop_glerror();
-
LLViewerTextureManager::cleanup() ;
LLImageGL::cleanupClass() ;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index f1df67494f..e525d6bad0 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -66,10 +66,11 @@
#include <boost/lexical_cast.hpp>
-LLVOAvatarSelf *gAgentAvatarp = NULL;
+LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
+
BOOL isAgentAvatarValid()
{
- return (gAgentAvatarp &&
+ return (gAgentAvatarp.notNull() &&
(gAgentAvatarp->getRegion() != NULL) &&
(!gAgentAvatarp->isDead()));
}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 54dbe81993..655fb3a012 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -383,7 +383,7 @@ private:
};
-extern LLVOAvatarSelf *gAgentAvatarp;
+extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
BOOL isAgentAvatarValid();
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index d8aa0b7d5c..0f7f63061b 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -221,7 +221,7 @@ void LLWearable::createVisualParams()
param->resetDrivenParams();
if(!param->linkDrivenParams(boost::bind(wearable_function,(LLWearable*)this, _1), false))
{
- if( !param->linkDrivenParams(boost::bind(avatar_function,gAgentAvatarp,_1 ), true))
+ if( !param->linkDrivenParams(boost::bind(avatar_function,gAgentAvatarp.get(),_1 ), true))
{
llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl;
continue;