@@ -1582,7 +1582,7 @@ void LLPanelMainInventory::initInventoryViews()
1582
1582
1583
1583
void LLPanelMainInventory::toggleViewMode ()
1584
1584
{
1585
- if (mSingleFolderMode && isCombinationViewMode ())
1585
+ if (mSingleFolderMode && isCombinationViewMode () && mCombinationGalleryPanel -> getRootFolder (). notNull () )
1586
1586
{
1587
1587
mCombinationInventoryPanel ->getRootFolder ()->setForceArrange (false );
1588
1588
}
@@ -2047,7 +2047,8 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata)
2047
2047
}
2048
2048
else
2049
2049
{
2050
- LLFolderViewItem* current_item = getActivePanel ()->getRootFolder ()->getCurSelectedItem ();
2050
+ LLFolderView* root_folder = getActivePanel () ? getActivePanel ()->getRootFolder () : nullptr ;
2051
+ LLFolderViewItem* current_item = root_folder ? root_folder->getCurSelectedItem () : nullptr ;
2051
2052
if (current_item)
2052
2053
{
2053
2054
inv_item = dynamic_cast <LLViewerInventoryItem*>(static_cast <LLFolderViewModelItemInventory*>(current_item->getViewModelItem ())->getInventoryObject ());
@@ -2443,8 +2444,6 @@ void LLPanelMainInventory::updateCombinationVisibility()
2443
2444
mCombinationGalleryPanel ->handleModifiedFilter ();
2444
2445
}
2445
2446
2446
- getActivePanel ()->getRootFolder ();
2447
-
2448
2447
if (mReshapeInvLayout
2449
2448
&& show_inv_pane
2450
2449
&& (mCombinationGalleryPanel ->hasVisibleItems () || mCombinationGalleryPanel ->areViewsInitialized ())
@@ -2501,8 +2500,12 @@ void LLPanelMainInventory::updateCombinationVisibility()
2501
2500
&& mCombinationInventoryPanel ->areViewsInitialized ())
2502
2501
{
2503
2502
mCombinationInventoryPanel ->setSelectionByID (mCombInvUUIDNeedsRename , true );
2504
- mCombinationInventoryPanel ->getRootFolder ()->scrollToShowSelection ();
2505
- mCombinationInventoryPanel ->getRootFolder ()->setNeedsAutoRename (true );
2503
+ LLFolderView* root = mCombinationInventoryPanel ->getRootFolder ();
2504
+ if (root)
2505
+ {
2506
+ root->scrollToShowSelection ();
2507
+ root->setNeedsAutoRename (true );
2508
+ }
2506
2509
mCombInvUUIDNeedsRename .setNull ();
2507
2510
}
2508
2511
}
0 commit comments