diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-17 21:51:10 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-17 21:51:10 -0500 |
commit | 8ced6cae88331eefaa170b23c3a97d0d691bae15 (patch) | |
tree | eae997a218f6450122acd56a3fde34d41db71fc1 /indra/newview/llfavoritesbar.cpp | |
parent | cd276a208b51f840178b6ff49711ba6e78940185 (diff) |
EXT-3559 : Crash when deleting last Favorites entry
Map accessor was not checking for NULL.
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index da0a9727a9..826cb0bb3b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -662,12 +662,16 @@ void LLFavoritesBarCtrl::updateButtons() LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it); if (button) { - // an child's order and mItems should be same - if (button->getLandmarkId() != mItems[first_changed_item_index]->getUUID() // sort order has been changed - || button->getLabelSelected() != mItems[first_changed_item_index]->getDisplayName() // favorite's name has been changed - || button->getRect().mRight < rightest_point) // favbar's width has been changed + const LLViewerInventoryItem *item = mItems[first_changed_item_index].get(); + if (item) { - break; + // an child's order and mItems should be same + if (button->getLandmarkId() != item->getUUID() // sort order has been changed + || button->getLabelSelected() != item->getDisplayName() // favorite's name has been changed + || button->getRect().mRight < rightest_point) // favbar's width has been changed + { + break; + } } first_changed_item_index++; } |