diff options
Diffstat (limited to 'indra/newview/llsplitbutton.cpp')
-rw-r--r-- | indra/newview/llsplitbutton.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index 790305103d..c216319e76 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -243,7 +243,14 @@ LLSplitButton::LLSplitButton(const LLSplitButton::Params& p) item_top -= (rc.getHeight() + BUTTON_PAD); } - setTopLostCallback(boost::bind(&LLSplitButton::hideButtons, this)); + mTopLostSignalConnection = setTopLostCallback(boost::bind(&LLSplitButton::hideButtons, this)); +} + +LLSplitButton::~LLSplitButton() +{ + // explicitly disconect to avoid hideButtons with + // dead pointers being called on destruction + mTopLostSignalConnection.disconnect(); } |