diff options
author | James Cook <james@lindenlab.com> | 2009-08-18 00:43:56 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-08-18 00:43:56 +0000 |
commit | d53725ece11eb3403128dd77834742a1d084138f (patch) | |
tree | bcc9617ab6a34a3686557b586d575a877a2c5069 /indra/llui | |
parent | 22fef0515f7a81327c42bac9126bc8accb2591fb (diff) |
EXT-549 Viewer crash when attempting to close detatched top menu. LLTearOffMenu wasn't registering its closeTearOff method because postBuild() isn't called because it isn't built from XML. Moving registration of closeTearOff to the constructor fixes it. Discussed with Steve, but not reviewed formally.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.cpp | 11 | ||||
-rw-r--r-- | indra/llui/llmenugl.h | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index b51884f8c0..5be53e6afc 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3385,17 +3385,14 @@ LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) : // highlight first item (tear off item will be disabled) mMenu->highlightNextItem(NULL); -} -LLTearOffMenu::~LLTearOffMenu() -{ + // Can't do this in postBuild() because that is only called for floaters + // constructed from XML. + mCloseSignal.connect(boost::bind(&LLTearOffMenu::closeTearOff, this)); } -// virtual -BOOL LLTearOffMenu::postBuild() +LLTearOffMenu::~LLTearOffMenu() { - mCloseSignal.connect(boost::bind(&LLTearOffMenu::closeTearOff, this)); - return TRUE; } void LLTearOffMenu::draw() diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 1058877d10..d39a02da28 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -788,8 +788,6 @@ public: static LLTearOffMenu* create(LLMenuGL* menup); virtual ~LLTearOffMenu(); - virtual BOOL postBuild(); - virtual void draw(void); virtual void onFocusReceived(); virtual void onFocusLost(); |