master
Debi King (Dessie) 2012-02-22 14:02:15 -05:00
commit 167a7dcd2f
6 changed files with 15 additions and 9 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -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() ;

View File

@ -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()));
}

View File

@ -383,7 +383,7 @@ private:
};
extern LLVOAvatarSelf *gAgentAvatarp;
extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
BOOL isAgentAvatarValid();

View File

@ -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;