diff options
| -rw-r--r-- | indra/llrender/llimagegl.cpp | 40 | ||||
| -rw-r--r-- | indra/llrender/llimagegl.h | 2 | ||||
| -rw-r--r-- | indra/llui/llbadge.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatersearch.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.h | 4 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 4 | 
9 files changed, 55 insertions, 24 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 20cba68f84..89500dcc04 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -622,7 +622,7 @@ void LLImageGL::setImage(const LLImageRaw* imageraw)  }  static LLTrace::BlockTimerStatHandle FTM_SET_IMAGE("setImage"); -void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) +BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)  {  	LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE);  	bool is_compressed = false; @@ -787,19 +787,33 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)  						llassert(prev_mip_data);  						llassert(cur_mip_size == bytes*4);  #endif -						U8* new_data = new U8[bytes]; +						U8* new_data = new(std::nothrow) U8[bytes]; +						if (!new_data) +						{ +							stop_glerror(); + +							if (prev_mip_data) +								delete[] prev_mip_data; +							if (cur_mip_data) +								delete[] cur_mip_data; +							 +							mGLTextureCreated = false; +							return FALSE; +						} +						else +						{  #ifdef SHOW_ASSERT -						llassert(prev_mip_data); -						llassert(cur_mip_size == bytes*4); -						llassert_always(new_data); +							llassert(prev_mip_data); +							llassert(cur_mip_size == bytes * 4);  #endif -						LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); -						cur_mip_data = new_data; +							LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); +							cur_mip_data = new_data;  #ifdef SHOW_ASSERT -						cur_mip_size = bytes;  +							cur_mip_size = bytes;  #endif +						}  					}  					llassert(w > 0 && h > 0 && cur_mip_data); @@ -886,6 +900,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)  	}  	stop_glerror();  	mGLTextureCreated = true; +	return TRUE;  }  BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) @@ -1355,8 +1370,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_  	if (mTexName != 0 && discard_level == mCurrentDiscardLevel)  	{  		// This will only be true if the size has not changed -		setImage(data_in, data_hasmips); -		return TRUE; +		return setImage(data_in, data_hasmips);  	}  	U32 old_name = mTexName; @@ -1398,7 +1412,11 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_  	mCurrentDiscardLevel = discard_level;	 -	setImage(data_in, data_hasmips); +	if (!setImage(data_in, data_hasmips)) +	{ +		stop_glerror(); +		return FALSE; +	}  	// Set texture options to our defaults.  	gGL.getTexUnit(0)->setHasMipMaps(mHasMipMaps); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index ad2aea9067..2be54be062 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -105,7 +105,7 @@ public:  		S32 category = sMaxCategories-1);  	BOOL createGLTexture(S32 discard_level, const U8* data, BOOL data_hasmips = FALSE, S32 usename = 0);  	void setImage(const LLImageRaw* imageraw); -	void setImage(const U8* data_in, BOOL data_hasmips = FALSE); +	BOOL setImage(const U8* data_in, BOOL data_hasmips = FALSE);  	BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE);  	BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE);  	BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height); diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 42726de0ad..15b6899d74 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -224,7 +224,7 @@ void LLBadge::draw()  	{  		LLView* owner_view = mOwner.get(); -		if (owner_view) +		if (owner_view && owner_view->isInVisibleChain())  		{  			//  			// Calculate badge size based on label text diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index a446b767ac..66e832111b 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -100,6 +100,7 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) :  	mCategoryPaths["events"]       = "search/events";  	mCategoryPaths["groups"]       = "search/groups";  	mCategoryPaths["wiki"]         = "search/wiki"; +	mCategoryPaths["land"]         = "land";  	mCategoryPaths["destinations"] = "destinations";  	mCategoryPaths["classifieds"]  = "classifieds";  } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index c76985f42e..c876c1c149 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -299,12 +299,24 @@ void LLPanelLogin::addFavoritesToStartLocation()  	// Load favorites into the combo.  	std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); +	LLStringUtil::toLower(user_defined_name);  	std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' ');  	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");  	std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");  	mUsernameLength = user_defined_name.length();  	updateLoginButtons(); +	std::string::size_type index = user_defined_name.find(' '); +	if (index != std::string::npos) +	{ +		std::string username = user_defined_name.substr(0, index); +		std::string lastname = user_defined_name.substr(index+1); +		if (lastname == "resident") +		{ +			user_defined_name = username; +		} +	} +  	LLSD fav_llsd;  	llifstream file;  	file.open(filename.c_str()); @@ -492,7 +504,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,  	LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL;  	if(authenticator.isMap() &&   	   authenticator.has("secret") &&  -	   (authenticator["secret"].asString().size() > 0)) +	   (authenticator["secret"].asString().size() > 0) && remember)  	{  		// This is a MD5 hex digest of a password. diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index e08670eff3..2d2ba30e9b 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -146,18 +146,16 @@ void LLInboxFolderViewFolder::draw()  	LLFolderViewFolder::draw();  } -void LLInboxFolderViewFolder::selectItem() +BOOL LLInboxFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )  {  	deFreshify(); - -	LLFolderViewFolder::selectItem(); +	return LLFolderViewFolder::handleMouseDown(x, y, mask);  } -void LLInboxFolderViewFolder::toggleOpen() +BOOL LLInboxFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )  {  	deFreshify(); - -	LLFolderViewFolder::toggleOpen(); +	return LLFolderViewFolder::handleDoubleClick(x, y, mask);  }  void LLInboxFolderViewFolder::computeFreshness() diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h index b1335e2d71..d398cdafed 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.h +++ b/indra/newview/llpanelmarketplaceinboxinventory.h @@ -69,8 +69,8 @@ public:      void addItem(LLFolderViewItem* item);  	void draw(); -	void selectItem(); -	void toggleOpen(); +	BOOL handleMouseDown(S32 x, S32 y, MASK mask); +	BOOL handleDoubleClick(S32 x, S32 y, MASK mask);  	void computeFreshness();  	void deFreshify(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f77b48ff80..7b4d8ef329 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -628,7 +628,7 @@ void LLVOVolume::updateTextures()  		if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())  		{ //delete vertex buffer to free up some VRAM  			LLSpatialGroup* group  = mDrawable->getSpatialGroup(); -			if (group) +			if (group && (group->mVertexBuffer.notNull() || !group->mBufferMap.empty() || !group->mDrawMap.empty()))  			{  				group->destroyGL(true); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 62fad32246..9ae788a409 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1750,8 +1750,10 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )  		case MAP_ITEM_LAND_FOR_SALE:  		case MAP_ITEM_LAND_FOR_SALE_ADULT:  			{ +				LLVector3d pos_global = viewPosToGlobal(x, y); +				LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);  				LLFloaterReg::hideInstance("world_map"); -				LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("query", id)); +				LLFloaterReg::showInstance("search", LLSD().with("category", "land").with("query", info->getName()));  				break;  			}  		case MAP_ITEM_CLASSIFIED:  | 
