diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-14 20:46:13 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-03-14 22:07:30 +0200 |
commit | 895a6739d3d02e11750e9ada72b730d02998d4c0 (patch) | |
tree | bdbcc74a5b05733b445c3e85be493b848a3b86ae | |
parent | 17fbbef67b2ee853b6ea424fcc617089d848d4a7 (diff) |
#3750 Crash at isSaveTextureEnabled
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 5bd2a53e7c..d964fa9170 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1582,7 +1582,7 @@ void LLPanelMainInventory::initInventoryViews() void LLPanelMainInventory::toggleViewMode() { - if(mSingleFolderMode && isCombinationViewMode()) + if(mSingleFolderMode && isCombinationViewMode() && mCombinationGalleryPanel->getRootFolder().notNull()) { mCombinationInventoryPanel->getRootFolder()->setForceArrange(false); } @@ -2047,7 +2047,8 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) } else { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + LLFolderView* root_folder = getActivePanel() ? getActivePanel()->getRootFolder() : nullptr; + LLFolderViewItem* current_item = root_folder ? root_folder->getCurSelectedItem() : nullptr; if (current_item) { inv_item = dynamic_cast<LLViewerInventoryItem*>(static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getInventoryObject()); @@ -2443,8 +2444,6 @@ void LLPanelMainInventory::updateCombinationVisibility() mCombinationGalleryPanel->handleModifiedFilter(); } - getActivePanel()->getRootFolder(); - if (mReshapeInvLayout && show_inv_pane && (mCombinationGalleryPanel->hasVisibleItems() || mCombinationGalleryPanel->areViewsInitialized()) @@ -2501,8 +2500,12 @@ void LLPanelMainInventory::updateCombinationVisibility() && mCombinationInventoryPanel->areViewsInitialized()) { mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, true); - mCombinationInventoryPanel->getRootFolder()->scrollToShowSelection(); - mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(true); + LLFolderView* root = mCombinationInventoryPanel->getRootFolder(); + if (root) + { + root->scrollToShowSelection(); + root->setNeedsAutoRename(true); + } mCombInvUUIDNeedsRename.setNull(); } } |