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)
|
// set the hover status (called by it's menu)
|
||||||
void LLMenuItemBranchDownGL::setHighlight( BOOL highlight )
|
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.
|
//NOTE: Purposely calling all the way to the base to bypass auto-open.
|
||||||
LLMenuItemGL::setHighlight(highlight);
|
LLMenuItemGL::setHighlight(highlight);
|
||||||
|
|
||||||
|
LLMenuGL* branch = getBranch();
|
||||||
|
if (!branch)
|
||||||
|
return;
|
||||||
|
|
||||||
if( !highlight)
|
if( !highlight)
|
||||||
{
|
{
|
||||||
if (getBranch()->getTornOff())
|
if (branch->getTornOff())
|
||||||
{
|
{
|
||||||
((LLFloater*)getBranch()->getParent())->setFocus(FALSE);
|
((LLFloater*)branch->getParent())->setFocus(FALSE);
|
||||||
getBranch()->clearHoverItem();
|
branch->clearHoverItem();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getBranch()->setVisible( FALSE );
|
branch->setVisible( FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user