dessie linden avatar dessie linden committed cf79462 Merge

merge

Comments (0)

Files changed (6)

indra/newview/llappviewer.cpp

 
 bool LLAppViewer::cleanup()
 {
+	//ditch LLVOAvatarSelf instance
+	gAgentAvatarp = NULL;
+
 	// workaround for DEV-35406 crash on shutdown
 	LLEventPumps::instance().reset();
 

indra/newview/lldriverparam.cpp

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

indra/newview/llviewerwindow.cpp

 	gSky.cleanup();
 	stop_glerror();
 
-	LLWearableList::instance().cleanup() ;
-
-	gTextureList.shutdown();
-	stop_glerror();
-
-	gBumpImageList.shutdown();
-	stop_glerror();
-
-	LLWorldMapView::cleanupTextures();
-
 	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();
+	stop_glerror();
+
+	gBumpImageList.shutdown();
+	stop_glerror();
+
+	LLWorldMapView::cleanupTextures();
+
 	LLViewerTextureManager::cleanup() ;
 	LLImageGL::cleanupClass() ;
 

indra/newview/llvoavatarself.cpp

 
 #include <boost/lexical_cast.hpp>
 
-LLVOAvatarSelf *gAgentAvatarp = NULL;
+LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
+
 BOOL isAgentAvatarValid()
 {
-	return (gAgentAvatarp &&
+	return (gAgentAvatarp.notNull() &&
 			(gAgentAvatarp->getRegion() != NULL) &&
 			(!gAgentAvatarp->isDead()));
 }

indra/newview/llvoavatarself.h

 
 };
 
-extern LLVOAvatarSelf *gAgentAvatarp;
+extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
 
 BOOL isAgentAvatarValid();
 

indra/newview/llwearable.cpp

 		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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.