summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-17 01:31:02 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-17 01:31:02 +0300
commitb5b0c174390b4158c69eeff7efd59c4f1615e491 (patch)
treefc61c5e1e0e80c496e09158103f205a1c7713ca4 /indra/newview/llinventorygallery.cpp
parent7607047a95a8b1cb89e3007138fbb00986067c2b (diff)
SL-19886 Fix onidle crash after closing inventory floater
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index f81beefc28..cfaff512ff 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -143,8 +143,8 @@ LLInventoryGallery::~LLInventoryGallery()
delete mInventoryGalleryMenu;
delete mRootGalleryMenu;
delete mFilter;
-
- gIdleCallbacks.deleteFunction(onIdle, this);
+
+ gIdleCallbacks.deleteFunction(onIdle, (void*)this);
while (!mUnusedRowPanels.empty())
{
@@ -184,8 +184,6 @@ LLInventoryGallery::~LLInventoryGallery()
void LLInventoryGallery::setRootFolder(const LLUUID cat_id)
{
- gIdleCallbacks.deleteFunction(onIdle, this);
-
LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
if(!category || (mFolderID == cat_id))
{
@@ -195,7 +193,13 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id)
{
mBackwardFolders.push_back(mFolderID);
}
+
+ gIdleCallbacks.deleteFunction(onIdle, (void*)this);
+
mFolderID = cat_id;
+ mItemToSelect.setNull();
+ mItemBuildQuery.clear();
+ mNeedsArrange = false;
dirtyRootFolder();
}