EXT-2819 : Crash in appearance color picker
Enforcing out-of-order destruction in llfloatercustomize to avoid this crash.master
parent
e2360f3d39
commit
5a02b66cd2
|
|
@ -306,13 +306,16 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
|
|||
}
|
||||
}
|
||||
|
||||
void LLColorSwatchCtrl::onFloaterClose()
|
||||
// This is called when the main floatercustomize panel is closed.
|
||||
// Since this class has pointers up to its parents, we need to cleanup
|
||||
// this class first in order to avoid a crash.
|
||||
void LLColorSwatchCtrl::onParentFloaterClosed()
|
||||
{
|
||||
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
|
||||
|
||||
if (pickerp)
|
||||
{
|
||||
pickerp->setSwatch(NULL);
|
||||
pickerp->closeFloater();
|
||||
}
|
||||
|
||||
mPickerHandle.markDead();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
/*virtual*/ void setEnabled( BOOL enabled );
|
||||
|
||||
static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
|
||||
void onFloaterClose();
|
||||
void onParentFloaterClosed();
|
||||
|
||||
protected:
|
||||
BOOL mValid;
|
||||
|
|
|
|||
|
|
@ -241,16 +241,6 @@ BOOL LLFloaterColorPicker::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLFloaterColorPicker::onClose(bool app_settings)
|
||||
{
|
||||
if (mSwatch)
|
||||
{
|
||||
mSwatch->onFloaterClose();
|
||||
}
|
||||
stopUsingPipette();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn )
|
||||
|
|
|
|||
Loading…
Reference in New Issue