diff options
-rw-r--r-- | indra/llui/lleditmenuhandler.cpp | 7 | ||||
-rw-r--r-- | indra/llui/lleditmenuhandler.h | 2 | ||||
-rw-r--r-- | indra/llui/lllineeditor.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 5 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 5 |
7 files changed, 10 insertions, 28 deletions
diff --git a/indra/llui/lleditmenuhandler.cpp b/indra/llui/lleditmenuhandler.cpp index 821afae8fd..9d8af39a7a 100644 --- a/indra/llui/lleditmenuhandler.cpp +++ b/indra/llui/lleditmenuhandler.cpp @@ -37,3 +37,10 @@ /* static */ LLEditMenuHandler* LLEditMenuHandler::gEditMenuHandler = NULL; +LLEditMenuHandler::~LLEditMenuHandler() +{ + if (gEditMenuHandler == this) + { + gEditMenuHandler = NULL; + } +}
\ No newline at end of file diff --git a/indra/llui/lleditmenuhandler.h b/indra/llui/lleditmenuhandler.h index 1de9c56afb..d72283cd99 100644 --- a/indra/llui/lleditmenuhandler.h +++ b/indra/llui/lleditmenuhandler.h @@ -38,7 +38,7 @@ class LLEditMenuHandler { public: // this is needed even though this is just an interface class. - virtual ~LLEditMenuHandler() {}; + virtual ~LLEditMenuHandler(); virtual void undo() {}; virtual BOOL canUndo() const { return FALSE; } diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 483a394bbd..2a17ddb9e7 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -192,12 +192,8 @@ LLLineEditor::~LLLineEditor() { mCommitOnFocusLost = FALSE; + // calls onCommit() while LLLineEditor still valid gFocusMgr.releaseFocusIfNeeded( this ); - - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index bf0866a655..db0f2bd6e2 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -324,11 +324,6 @@ LLScrollListCtrl::~LLScrollListCtrl() delete mSortCallback; std::for_each(mItemList.begin(), mItemList.end(), DeletePointer()); - - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } } diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 94c7ebec2a..c9751c8139 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -304,13 +304,7 @@ void LLTextEditor::initFromParams( const LLTextEditor::Params& p) LLTextEditor::~LLTextEditor() { gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() while LLTextEditor still valid - - // Route menu back to the default - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } - + // Scrollbar is deleted by LLView std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer()); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 43743ec37a..83eb9579b2 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -276,11 +276,6 @@ LLFolderView::~LLFolderView( void ) mRenamer = NULL; mStatusTextBox = NULL; - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } - mAutoOpenItems.removeAllNodes(); gIdleCallbacks.deleteFunction(idle, this); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d3eed40f25..e0cbddafae 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1473,11 +1473,6 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, ////////////////////////////////////////////////////////////////////////////////////////// LLViewerMediaImpl::~LLViewerMediaImpl() { - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } - destroyMediaSource(); LLViewerMediaTexture::removeMediaImplFromTexture(mTextureId) ; |