diff options
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 8 |
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; } } |