Skip to content
Snippets Groups Projects
Commit ab428e19 authored by maxim_productengine's avatar maxim_productengine
Browse files

SL-1866 FIXED [OSX] Viewer crashes when the user changes avatar after editing texture

parent 9a0f3767
No related branches found
No related tags found
No related merge requests found
......@@ -1096,6 +1096,10 @@ void LLTextureCtrl::setVisible( BOOL visible )
void LLTextureCtrl::setEnabled( BOOL enabled )
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( floaterp )
{
floaterp->setActive(enabled);
}
if( enabled )
{
std::string tooltip;
......@@ -1110,11 +1114,6 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
closeDependentFloater();
}
if( floaterp )
{
floaterp->setActive(enabled);
}
mCaption->setEnabled( enabled );
LLView::setEnabled( enabled );
......@@ -1215,9 +1214,10 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
void LLTextureCtrl::closeDependentFloater()
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( floaterp )
if( floaterp && floaterp->isInVisibleChain())
{
floaterp->setOwner(NULL);
floaterp->setVisible(FALSE);
floaterp->closeFloater();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment