diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-21 07:24:40 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-21 07:24:40 +0100 |
commit | 842e5111ae2d0a83755ff902afa43dc84e45662b (patch) | |
tree | e77d8803bb967453ff6bc62bbf20f9d260f5db26 /indra | |
parent | 76a7df57ea572fbc877d0e335483993e33fb214f (diff) | |
parent | f97e196d0698716fe215dfa1719519055de2cacc (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfloater.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 2 | ||||
-rw-r--r-- | indra/newview/llavataractions.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llmoveview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llmoveview.h | 2 |
6 files changed, 40 insertions, 5 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 39a6855273..22d6f6ca52 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -451,6 +451,14 @@ void LLFloater::enableResizeCtrls(bool enable) } } +void LLFloater::destroy() +{ + // LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before + // it was deleted via LLMortician::updateClass(). See EXT-8458. + LLFloaterReg::removeInstance(mInstanceName, mKey); + die(); +} + // virtual LLFloater::~LLFloater() { diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 3ea035777c..42f422f91c 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -308,7 +308,7 @@ protected: BOOL getAutoFocus() const { return mAutoFocus; } LLDragHandle* getDragHandle() const { return mDragHandle; } - void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater() + void destroy(); // Don't call this directly. You probably want to call closeFloater() virtual void onClickCloseBtn(); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 752a2e7504..1e59e5b805 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -550,9 +550,10 @@ namespace action_give_inventory } LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (NULL == active_panel) + if (!active_panel) { - return; + active_panel = get_outfit_editor_inventory_panel(); + if (!active_panel) return; } const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c0fa910f86..7c33923f04 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -111,6 +111,12 @@ public: return pInstance; } + ~LLChatHistoryHeader() + { + // Detach the info button so that it doesn't get destroyed (EXT-8463). + hideInfoCtrl(); + } + BOOL handleMouseUp(S32 x, S32 y, MASK mask) { return LLPanel::handleMouseUp(x,y,mask); @@ -382,8 +388,18 @@ protected: if (!sInfoCtrl) { + // *TODO: Delete the button at exit. sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance()); - sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl)); + if (sInfoCtrl) + { + sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl)); + } + } + + if (!sInfoCtrl) + { + llassert(sInfoCtrl != NULL); + return; } LLTextBase* name = getChild<LLTextBase>("user_name"); diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 6ae4a5e5e4..fc41137686 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -83,6 +83,16 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) { } +LLFloaterMove::~LLFloaterMove() +{ + // Ensure LLPanelStandStopFlying panel is not among floater's children. See EXT-8458. + setVisible(FALSE); + + // Otherwise it can be destroyed and static pointer in LLPanelStandStopFlying::getInstance() will become invalid. + // Such situation was possible when LLFloaterReg returns "dead" instance of floater. + // Should not happen after LLFloater::destroy was modified to remove "dead" instances from LLFloaterReg. +} + // virtual BOOL LLFloaterMove::postBuild() { diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index d463861188..43b0342744 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -51,7 +51,7 @@ class LLFloaterMove private: LLFloaterMove(const LLSD& key); - ~LLFloaterMove() {} + ~LLFloaterMove(); public: /*virtual*/ BOOL postBuild(); |