summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
authorMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-04-01 17:03:59 -0700
committerMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-04-01 17:03:59 -0700
commitb1ae22c3eb71767219ebb96ec80011e10bbfabbe (patch)
tree41eb0fd5eb7f4986f99ce2a0d11273c32f33e7d1 /indra/newview/llnamelistctrl.cpp
parentf17cfd952a274cc6c684e50db004d62373a49d1f (diff)
parent9bdbc10aba78d7c6fec832ee4c411b483f05c441 (diff)
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;
+ }
}
}