summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index a5a61f0c7b..2d3401966b 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1003,7 +1003,10 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
}
const LLUUID item_id = current_item->getListener()->getUUID();
LLViewerInventoryItem *item = gInventory.getItem(item_id);
- item->regenerateLink();
+ if (item)
+ {
+ item->regenerateLink();
+ }
active_panel->setSelection(item_id, TAKE_FOCUS_NO);
}
if (command_name == "find_original")
@@ -1071,7 +1074,11 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const LLUUID &item_id = (*iter);
LLFolderViewItem *item = folder->getItemByID(item_id);
- can_delete &= item->getListener()->isItemRemovable();
+ const LLFolderViewEventListener *listener = item->getListener();
+ llassert(listener);
+ if (!listener) return FALSE;
+ can_delete &= listener->isItemRemovable();
+ can_delete &= !listener->isItemInTrash();
}
return can_delete;
}