diff options
| author | Rye Mutt <rye@alchemyviewer.org> | 2022-10-19 16:23:25 -0400 | 
|---|---|---|
| committer | Rye Mutt <rye@alchemyviewer.org> | 2022-10-19 16:28:03 -0400 | 
| commit | bbd8df15de6b8f9b321f251c3e764ea654d5ecc7 (patch) | |
| tree | 58c0edcab9957d03dad372b37601c479953eee5d /indra/newview | |
| parent | a48374e8cfbdf261b4902024fb66e60432602b12 (diff) | |
Fix menu leaks and lazy creation in text editing and scroll lists
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/lllistcontextmenu.cpp | 10 | 
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp index 6bda8b1d0d..77185411c5 100644 --- a/indra/newview/lllistcontextmenu.cpp +++ b/indra/newview/lllistcontextmenu.cpp @@ -51,6 +51,7 @@ LLListContextMenu::~LLListContextMenu()  	if (!mMenuHandle.isDead())  	{  		mMenuHandle.get()->die(); +		mMenuHandle.markDead();  	}  } @@ -59,13 +60,8 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32  	LLContextMenu* menup = mMenuHandle.get();  	if (menup)  	{ -		//preventing parent (menu holder) from deleting already "dead" context menus on exit -		LLView* parent = menup->getParent(); -		if (parent) -		{ -			parent->removeChild(menup); -		} -		delete menup; +		menup->die(); +		mMenuHandle.markDead();  		mUUIDs.clear();  	}  | 
