summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-01 17:12:12 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-01 17:12:12 +0100
commit569f322f0d43ba4e1f079d362d333af5b84a0e32 (patch)
tree7141309c52129400982944d1f91667b74d65c6cb /indra/newview/llnamelistctrl.cpp
parent8421d3dcd3aad07efecbfa490ccc8e71119b9cab (diff)
parentb98ebdecda66a1f08e74321cb255e39edfbc47dd (diff)
PE merge
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r--indra/newview/llnamelistctrl.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 7a538e372b..9611c286eb 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -148,16 +148,30 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index )
if(0 <= cur_index && cur_index < (S32)getItemList().size())
{
LLScrollListItem* item = getItemList()[cur_index];
- LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex));
- if(cell)
- cell->setTextWidth(cell->getTextWidth() + info_icon_size);
+ if (item)
+ {
+ LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex));
+ if (cell)
+ cell->setTextWidth(cell->getTextWidth() + info_icon_size);
+ }
+ else
+ {
+ llwarns << "highlighted name list item is NULL" << llendl;
+ }
}
if(target_index != -1)
{
LLScrollListItem* item = getItemList()[target_index];
LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex));
- if(cell)
- cell->setTextWidth(cell->getTextWidth() - info_icon_size);
+ if (item)
+ {
+ if (cell)
+ cell->setTextWidth(cell->getTextWidth() - info_icon_size);
+ }
+ else
+ {
+ llwarns << "target name item is NULL" << llendl;
+ }
}
}