summaryrefslogtreecommitdiff
path: root/indra/newview/llsplitbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsplitbutton.cpp')
-rw-r--r--indra/newview/llsplitbutton.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 60c0272a8b..5e363b358a 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();
}