summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 18:40:13 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 18:40:13 +0000
commite7c9f674945533e4a56313b74746886bdb724be2 (patch)
treed5ac7f392d0791680c82bab7d3517f4cfff71a32 /indra/newview/llfolderviewitem.cpp
parent1fcc26d570435817b0ce8c84dbec590b960298be (diff)
CID-136
Checker: NULL_RETURNS Function: LLInventorySort::operator ()(const LLFolderViewItem *const &, const LLFolderViewItem *const &) File: /indra/newview/llfolderviewitem.cpp
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r--indra/newview/llfolderviewitem.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 20cb2d3604..2a77835373 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2544,8 +2544,12 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde
{
// *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem
// or to LLInvFVBridge
- S32 a_sort = (static_cast<const LLItemBridge*>(a->getListener()))->getItem()->getSortField();
- S32 b_sort = (static_cast<const LLItemBridge*>(b->getListener()))->getItem()->getSortField();
+ LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a->getListener()))->getItem();
+ LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b->getListener()))->getItem();
+ if (!aitem || !bitem)
+ return false;
+ S32 a_sort = (aitem->getSortField();
+ S32 b_sort = (bitem->getSortField();
return a_sort < b_sort;
}
}