Nullcheck in LLMenuItemBranchDownGL::setHighlight (getBranch())
This commit is contained in:
@@ -1501,20 +1501,26 @@ void LLMenuItemBranchDownGL::openMenu( void )
|
||||
// set the hover status (called by it's menu)
|
||||
void LLMenuItemBranchDownGL::setHighlight( BOOL highlight )
|
||||
{
|
||||
if (highlight == getHighlight()) return;
|
||||
if (highlight == getHighlight())
|
||||
return;
|
||||
|
||||
//NOTE: Purposely calling all the way to the base to bypass auto-open.
|
||||
LLMenuItemGL::setHighlight(highlight);
|
||||
|
||||
LLMenuGL* branch = getBranch();
|
||||
if (!branch)
|
||||
return;
|
||||
|
||||
if( !highlight)
|
||||
{
|
||||
if (getBranch()->getTornOff())
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
((LLFloater*)getBranch()->getParent())->setFocus(FALSE);
|
||||
getBranch()->clearHoverItem();
|
||||
((LLFloater*)branch->getParent())->setFocus(FALSE);
|
||||
branch->clearHoverItem();
|
||||
}
|
||||
else
|
||||
{
|
||||
getBranch()->setVisible( FALSE );
|
||||
branch->setVisible( FALSE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user