diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-01 17:54:08 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-01 17:54:08 -0400 |
commit | 2854008e8edd3419fe37a8c4971223eda5945bfa (patch) | |
tree | 83640a42fcc5f71200a19e173a95da433760cf74 /indra/newview/llnamelistctrl.cpp | |
parent | 1ec47c39a6c4a6e7e518d0b91a87f50596362f06 (diff) | |
parent | 406b595e8c6811c2550340ba316328289d8b856f (diff) |
automated merge
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r-- | indra/newview/llnamelistctrl.cpp | 24 |
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; + } } } |