diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-01-04 10:57:49 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-01-04 10:57:49 +0200 |
commit | ab428e194eaa144e8dcecc353c3c7ed83d6cee3e (patch) | |
tree | fa556dfb5ccfe634ddd18843650f1ab1746d6c6b /indra | |
parent | 9a0f37670874a3289b31f0ba02342e85a1784447 (diff) |
SL-1866 FIXED [OSX] Viewer crashes when the user changes avatar after editing texture
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 1a2a10f721..1396a8546d 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -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(); } } |