diff options
author | Merov Linden <merov@lindenlab.com> | 2013-11-11 18:39:02 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-11-11 18:39:02 -0800 |
commit | e6b4b89bf12ae410fa87baf01117daa2a47754c0 (patch) | |
tree | 297264fd49797d75882b91bb80d68c1d196cacd5 /indra/llui/llfolderview.cpp | |
parent | 3111cf4ccf34f4bfe5aa0c1935f0a13c870a76ea (diff) |
MAINT-3320 : WIP : Use handle for elements that'll get deleted under us, quite a bit of debug spam to clean later
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rwxr-xr-x | indra/llui/llfolderview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index cf449217f5..4d1c2a38d0 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -176,6 +176,7 @@ LLFolderView::LLFolderView(const Params& p) { mViewModel->setFolderView(this); mRoot = this; + llinfos << "Merov : create folder view, this = " << this << ", name = " << (std::string(p.name)) << ", model = " << getFolderViewModel() << llendl; LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -243,6 +244,7 @@ LLFolderView::LLFolderView(const Params& p) // Destroys the object LLFolderView::~LLFolderView( void ) { + llinfos << "Merov : delete folder view (start), this = " << this << ", model = " << getFolderViewModel() << llendl; closeRenamer(); // The release focus call can potentially call the @@ -264,7 +266,9 @@ LLFolderView::~LLFolderView( void ) mItems.clear(); mFolders.clear(); + mViewModel->setFolderView(NULL); mViewModel = NULL; + llinfos << "Merov : delete folder view (end), this = " << this << ", model = " << getFolderViewModel() << llendl; } BOOL LLFolderView::canFocusChildren() const @@ -1598,6 +1602,13 @@ void LLFolderView::update() // If this is associated with the user's inventory, don't do anything // until that inventory is loaded up. LLFastTimer t2(FTM_INVENTORY); + + // If there's no model, the view is in suspended state (being deleted) and shouldn't be updated + if (getFolderViewModel() == NULL) + { + return; + } + //llinfos << "Merov : update, this = " << this << ", model = " << getFolderViewModel() << llendl; if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault()) { |